ExcelTool.io

IFERROR

Returns a fallback value when a formula produces an error, otherwise the formula's result.

Syntax

=IFERROR(value, value_if_error)

Arguments

  • value - The formula or expression to evaluate.
  • value_if_error - What to return if value is any error (#N/A, #DIV/0!, etc.).

Examples

=IFERROR(VLOOKUP(A2, D:F, 3, FALSE), "Not found")

Returns: The lookup, or "Not found" instead of #N/A

The tidy way to hide lookup misses.

=IFERROR(A2/B2, 0)

Returns: A2/B2, or 0 when B2 is blank/zero

Avoids #DIV/0! in calculated columns.

Common Errors and Gotchas

  • IFERROR hides every error type - if you only want to catch missing lookups, IFNA is more precise.
  • Don't wrap it so broadly that it masks real mistakes in your formula.

Does IFERROR Work in Google Sheets?

Yes. IFERROR uses the same syntax in Google Sheets and LibreOffice Calc, so you can paste these formulas straight across.

See Also