Nested IF statement

Receiving an error with the formula and couldn't find anything similar within the existing posts. I have 3 columns (Testers) and each tester will have the option to choose if something passed, failed or is ready to retest. I'm trying to have the formula ready If Column A reads Passed, then read column B and if that read Passed, then read Column C and if that reads passed, indicate Passed, if not leave Blank.

I've been able to do it if the columns read Failed, but the Passed does not work as outlined. If any of the 3 columns indicate failed, then the script is failed (even if the other 2 pass it).

=IF([Tester Trevor]@row = "Failed", "Failed", IF([Tester No. 2]@row = "Failed", "Failed", IF([Tester No. 3]@row = "Failed", "Failed", "")))

To capture total Passed, all 3 columns must indicate Passed. I've tried both AND and OR in the formula

=IF(([Tester Trevor]@row = "Passed", IF(AND([Tester No. 2]@row = "Passed", IF(AND([Tester No. 3]@row = "Passed, "Passed", "")))

Let me know if you need any additional information - Thanks!

Best Answer

  • Julie Fortney
    Julie Fortney Overachievers
    edited 02/06/23 Answer ✓

    Hi @Tracy S,

    Is your criteria as follows?

    • If any Tester failed it, the result should be "Failed"
    • If all Testers passed it, the result should be "Passed"
    • If less than 3 Testers passed it and none failed it, the result should be blank

    If so, try this formula:

    =IF(CONTAINS("Failed", [Tester 1]@row:[Tester 3]@row), "Failed", IF(AND([Tester 1]@row = "Passed", [Tester 2]@row = "Passed", [Tester 3]@row = "Passed"), "Passed", ""))

Answers

  • Julie Fortney
    Julie Fortney Overachievers
    edited 02/06/23 Answer ✓

    Hi @Tracy S,

    Is your criteria as follows?

    • If any Tester failed it, the result should be "Failed"
    • If all Testers passed it, the result should be "Passed"
    • If less than 3 Testers passed it and none failed it, the result should be blank

    If so, try this formula:

    =IF(CONTAINS("Failed", [Tester 1]@row:[Tester 3]@row), "Failed", IF(AND([Tester 1]@row = "Passed", [Tester 2]@row = "Passed", [Tester 3]@row = "Passed"), "Passed", ""))

  • Tracy S
    Tracy S ✭✭✭

    Thank you! That works

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!