IfError returns "incorrect argument"

Hi, I am trying to find values that exist between two Smartsheets. When it does, I should get a checkbox, and when it doesn't, I would like the checkbox to be unchecked.


If I use:

=IF(INDEX({Sheet B}, MATCH([ProjDef in ASH Custom]@row, {Sheet B}, 0)) = [ProjDef in ASH Custom]@row, 1, 0)

I get "#No Match" when a value doesn't exists between the two sheets.

And if I try:

=IFError(INDEX({Sheet B}, MATCH([ProjDef in ASH Custom]@row, {Sheet B}, 0)) = [ProjDef in ASH Custom]@row, 1, 0)

I get "#Incorrect Argument."


Can someone help point me in the right direction? Thanks!

Best Answer

  • KPH
    KPH ✭✭✭✭✭✭
    Answer ✓

    Hi @Peggy S.

    You are missing an argument from your formula. You need to include what you want the formula to return if there is an error. This part in bold means return 0 if there is an error. Which in turn means uncheck the checkbox.

    =IFERROR(IF(INDEX({Sheet B}, MATCH([ProjDef in ASH Custom]@row, {Sheet B}, 0)) = [ProjDef in ASH Custom]@row, 1, 0), 0)

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!