Possible to have two IFERROR values?

Options

I have an IFERROR formula that is working correctly., However, I was wondering if it was possible to add an additional IFERROR option. So, for instance, This formula works perfectly:

=IFERROR(INDEX({EventTitle}, MATCH([WE ID#]@row, {ID}, 0)), INDEX({EventTitleComp}, MATCH([WE ID#]@row, {IDComp}, 0)))

My only problem is that I was hoping to add an additional value of N/A, or even just blank, if the formula was still returning a #NO MATCH error. There are some WE ID#'s that are on my current sheet that will not be found on either sheet that the formulas are referencing.

So is it possible to add another option to the end? IE:

=IFERROR(INDEX({EventTitle}, MATCH([WE ID#]@row, {ID}, 0)), INDEX({EventTitleComp}, MATCH([WE ID#]@row, {IDComp}, 0)), "N/A")))


Thank you all for your help!

Best Answer

  • James Keuning
    James Keuning ✭✭✭✭✭
    Answer ✓
    Options

    Sure you can. Just test for the first condition using your IFERROR, and then in the "value_if_error" portion of this first test, put your second test. And then wrap that second test in the IFERROR formula.

    One way to accomplish this is to put the two formulas in two fields, with the IFERROR wrappers, and get them both working. Then copy the first working formula into the "value_if_error" portion of the second.

Answers

  • James Keuning
    James Keuning ✭✭✭✭✭
    Answer ✓
    Options

    Sure you can. Just test for the first condition using your IFERROR, and then in the "value_if_error" portion of this first test, put your second test. And then wrap that second test in the IFERROR formula.

    One way to accomplish this is to put the two formulas in two fields, with the IFERROR wrappers, and get them both working. Then copy the first working formula into the "value_if_error" portion of the second.

  • Shesha_K
    Shesha_K ✭✭✭
    Options

    Hi James!! Thank you so much for your help!


    This is the formula that worked for me, just in case anyone needs a visual:

    =IFERROR(INDEX({EventTitle}, MATCH([WE ID#]@row, {ID}, 0)), IFERROR(INDEX({EventTitleComp}, MATCH([WE ID#]@row, {IDComp}, 0)), "N/A"))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!