Return a custom result when a formula produces an error, otherwise return the formula's result.
Syntax
IFERROR(value, value_if_error)Arguments
valuerequired
The formula or expression to evaluate.
value_if_errorrequired
What to return if value is an error.
IFERROR wraps a formula and traps errors like #N/A, #DIV/0!, and #VALUE!, replacing them with text, a blank, or a fallback calculation. It keeps reports clean and is most often paired with lookup functions.
=IFERROR(VLOOKUP(E2,A:C,3,FALSE), "Not found")→Not foundShows friendly text instead of #N/A when the lookup fails.
=IFERROR(A2/B2, 0)→0Returns 0 instead of #DIV/0! when B2 is empty.
Wrap the risky formula
Put the calculation that might error as the first argument.
Choose the fallback
Decide whether to show text, a blank "", or an alternative number.
Yes — it catches every error type. Use it carefully so you don't mask genuine data problems you should investigate.