Return a custom result when a formula produces an error, otherwise return the formula's result.
IFERROR works the same in Google Sheets and is often wrapped around VLOOKUP, IMPORTRANGE, or QUERY.
IFERROR(value, value_if_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")Result: Not found
Shows friendly text instead of #N/A when the lookup fails.
=IFERROR(A2/B2, 0)Result: 0
Returns 0 instead of #DIV/0! when B2 is empty.
Yes — it catches every error type. Use it carefully so you don't mask genuine data problems you should investigate.