Three ways to handle Excel errors — each catches a different set, and choosing the wrong one can hide real bugs.
Excel formula errors (#N/A, #VALUE!, #REF!, #DIV/0!) appear when something goes wrong. Sometimes that's expected — a lookup finds no match. Sometimes it's a real bug — a formula referencing a deleted column. The function you choose determines whether you're handling expected errors or hiding real ones.
=IFERROR(formula, value_if_error)
=IFERROR(VLOOKUP(A2, D2:E100, 2, 0), "Not found")
-- If VLOOKUP returns ANY error, show "Not found" insteadIFERROR catches every error type: #N/A, #VALUE!, #REF!, #DIV/0!, #NAME?, #NULL!, #NUM!. It's the broadest catch.
Because IFERROR catches everything, it can hide real bugs. If your VLOOKUP range accidentally references a deleted column (#REF!), IFERROR silently shows "Not found" instead of alerting you to the problem. Use IFNA instead when you only expect #N/A errors.
=IFNA(formula, value_if_na)
=IFNA(VLOOKUP(A2, D2:E100, 2, 0), "Not found")
-- Only catches #N/A — other errors still showIFNA only handles #N/A errors — the "value not found" error. All other errors (broken references, wrong data types, division by zero) still appear. This is the safer choice for lookup formulas because real bugs remain visible.
=ISERROR(formula)
-- Returns TRUE if the formula produces any error, FALSE otherwise
=IF(ISERROR(VLOOKUP(A2,D2:E100,2,0)), "Not found", VLOOKUP(A2,D2:E100,2,0))
-- Old approach before IFERROR existed — calculates VLOOKUP twiceISERROR returns a logical value rather than replacing the error. Useful inside IF formulas or when you want to flag errors rather than replace them.
| Function | Catches | Best for |
|---|---|---|
| IFERROR | All errors | Cleaning up output for display, when any error is acceptable |
| IFNA | #N/A only | Lookup formulas where "not found" is expected |
| ISERROR | All errors (returns TRUE/FALSE) | Conditional logic based on whether an error occurred |
| ISNA | #N/A only (returns TRUE/FALSE) | Conditional logic for lookup misses |
Use IFNA for lookup formulas (VLOOKUP, XLOOKUP, MATCH) where a missing match is expected. Use IFERROR only for output-facing cells where any error should be hidden from end users. Avoid ISERROR unless you need the TRUE/FALSE result for further logic.
Practice this formula yourself — type it in a real spreadsheet and get instant feedback. Free, no download needed.
Start the Excel Basics track free →