I am wondering how I would add an If to a formula to add an additional approval layer when needed.
![MJ215](https://us.v-cdn.net/6031209/uploads/defaultavatar/nWRMFRX6I99I6.jpg)
I had a simple 4 person approval process that looked to see if 4 people selected "Approved" it will make a cell as "All Approved" and send an alert.
Current Formula:
=IF(COUNTIF([Jim Approval-RD]@row:[Angela Approval-RD]@row, "Approved") = 4, "All Approved", IF(CONTAINS("Declined", [Jim Approval-RD]@row:[Angela Approval-RD]@row), "Request Declined", IF(CONTAINS("Pending", [Jim Approval-RD]@row:[Angela Approval-RD]@row), "Pending Approval")))
Now, I need away to look at the [AVG VP Approval-RD] column and if this is not blank I will need the 4 approvers, but if it is blank I will only need the 3. My approval process has evolved to only require the AVG VP when a user selects something in a form, but if that is not selected I will only need the 3 approvers.
Best Answer
-
Copy this whole formula, change the 4 to 3, and those are your two main logics.
Logic 1 = Formula with 3
Logic 2 = Formula with 4
New Formula:
=IF(ISBLANK([AVG VP Approval-RD]@row), Logic 1, Logic 2)
You have a 3 part logic, part 1 counts how many "Approved" there are, and parts 2 and 3 just check to see if the words "Declined" or "Pending" are contained within that range. Which could still turn out to be true statements regardless if [AVG VP Approval-RD] is blank or not.
Hope this helps!
Answers
-
Copy this whole formula, change the 4 to 3, and those are your two main logics.
Logic 1 = Formula with 3
Logic 2 = Formula with 4
New Formula:
=IF(ISBLANK([AVG VP Approval-RD]@row), Logic 1, Logic 2)
You have a 3 part logic, part 1 counts how many "Approved" there are, and parts 2 and 3 just check to see if the words "Declined" or "Pending" are contained within that range. Which could still turn out to be true statements regardless if [AVG VP Approval-RD] is blank or not.
Hope this helps!
-
Thanks looks like this worked!
=IF(ISBLANK([AVG VP Approval-RD]@row), IF(COUNTIF([Jim Approval-RD]@row:[Angela Approval-RD]@row, "Approved") = 3, "All Approved", IF(CONTAINS("Declined", [Jim Approval-RD]@row:[Angela Approval-RD]@row), "Request Declined", IF(CONTAINS("Pending", [Jim Approval-RD]@row:[Angela Approval-RD]@row), "Pending Approval"))), IF(COUNTIF([AVG VP Approval-RD]@row:[Angela Approval-RD]@row, "Approved") = 4, "All Approved", IF(CONTAINS("Declined", [AVG VP Approval-RD]@row:[Angela Approval-RD]@row), "Request Declined", IF(CONTAINS("Pending", [AVG VP Approval-RD]@row:[Angela Approval-RD]@row), "Pending Approval"))))
-
Glad to hear it worked!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62K Get Help
- 338 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.3K Ideas & Feature Requests
- 130 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 282 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!