I am wondering how I would add an If to a formula to add an additional approval layer when needed.

Options

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

  • Nathan Gonzalez
    Nathan Gonzalez ✭✭✭
    edited 04/20/21 Answer ✓
    Options

    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

  • Nathan Gonzalez
    Nathan Gonzalez ✭✭✭
    edited 04/20/21 Answer ✓
    Options

    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!

  • MJ215
    MJ215 ✭✭
    Options

    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"))))

  • Nathan Gonzalez
    Options

    Glad to hear it worked!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!