Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Multiple IF ANDS criteria

Hello!

I'm trying to write a function for 3 criteria with if ands, "Approved", "Not Approved" and "Pending". Not sure im using if and correctly.

It's a document approval process which requires 5 individuals to review a document. I want the status of each document request to be shown per individual and then have the overall document status sjown.

For example

If Person A = approved, Person B= approved, Person C= approved, Person D= approved and Person E= approved then the overall status shown is "Approved".

If any of them "declined" the document then the overall status is shown as "Not approved"

If they haven't either approved or declined but its "submitted" then overall status should show "Pending".

I can't make the formula work for some reason.

  • When all individuals approve i do get the "approved" status, however anything else is shown as "Pending",

=IF(AND([Person A]1 = "Approved", [Person B]1 = "Approved", [Person C]1 = "Approved", [Person D]1 = "Approved", [Person E]1 = "Approved"), "Approved", IF(AND([Person A]1 = "Declined", [Person B]1 = "Declined", [Person C]1 = "Declined", [Person D]1 = "Declined", [Person E]1 = "Declined"), "Not Approved", "Pending"))

Thank you!

Tags:

Best Answer

  • Community Champion
    Answer ✓

    Hey @jenniferrdz

    Will this work for you?

    =IF(AND([Person A]1 = "Approved", [Person B]1 = "Approved", [Person C]1 = "Approved", [Person D]1 = "Approved", [Person E]1 = "Approved"), "Approved", IF(OR([Person A]1 = "Declined", [Person B]1 = "Declined", [Person C]1 = "Declined", [Person D]1 = "Declined", [Person E]1 = "Declined"), "Not Approved", "Pending"))

    If you don't need to specifically reference Row1 then change each reference row 1 to @cell (replace the 1 with @cell, example [Person A]@row) to make your formula more robust.

    Kelly

Answers

  • Community Champion
    Answer ✓

    Hey @jenniferrdz

    Will this work for you?

    =IF(AND([Person A]1 = "Approved", [Person B]1 = "Approved", [Person C]1 = "Approved", [Person D]1 = "Approved", [Person E]1 = "Approved"), "Approved", IF(OR([Person A]1 = "Declined", [Person B]1 = "Declined", [Person C]1 = "Declined", [Person D]1 = "Declined", [Person E]1 = "Declined"), "Not Approved", "Pending"))

    If you don't need to specifically reference Row1 then change each reference row 1 to @cell (replace the 1 with @cell, example [Person A]@row) to make your formula more robust.

    Kelly

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions