Function reference /Logical

IFERROR

Run in a real sheet

Returns a fallback value when a formula would otherwise show an error.

IFERROR(value, [value_if_error])

IFERROR catches #N/A, #DIV/0! and friends and substitutes something presentable. It is what turns a working sheet into a shareable one.

Executed 23 Aug 2026 Google Sheets · unedited screenshot
=IFERROR(VLOOKUP("Zoe", B1:C6, 2, FALSE), "No such rep") running in Google Sheets, returning No such rep
The formula sits in the formula bar and its answer sits in the grid, in one frame. Zoe is not in the list, so instead of #N/A the cell explains itself.

Worked example

RegionRepSales
WestAna1200
EastBen900
WestCara1500
NorthDan600
EastEve1100
=IFERROR(VLOOKUP("Zoe", B1:C6, 2, FALSE), "No such rep")

Returns No such rep.

Arguments

ArgumentRequiredWhat it does
value Yes The formula that might error.
value_if_error Optional What to show instead. Omitted, you get a blank.

Gotchas

  • 01It hides every error, including the ones caused by a genuine mistake in your formula. Build the formula first, wrap it second.
  • 02It does not catch a wrong-but-valid answer — only actual error values.
  • 03XLOOKUP's missing_value argument does the same job without the wrapper.