This is useful because it means the IFNA function won’t accidentally hide another more serious error.
We can catch this error and return an alternative result with the IFNA function.
To use the IFNA function to trap #N/A errors, embed the original formula inside IFNA as thefirstargument.
However, in cell I8, we now see a blank cell.
Inside IFNA, VLOOKUP returns #N/A as before.
However, unlike IFNA, IFERROR will catch any error.
This makes IFERROR a more blunt instrument since it will trap many kinds of errors.
For example, if a function name is misspelled, Excel will normally return the #NAME?
error:
Above there is no function called “ZLOOKUP”, so Excel returns #NAME?.
IFERROR is an elegant way to trap and manage errors without using more complicated nested IF statements.