AI · 1 min read

IFERROR

IFERROR function in Google Sheets: Value on error, otherwise formula result.

Logical function · Google Sheets

IFERROR function

IFERROR returns a value you choose when a formula produces an error. It keeps reports clean, though it can also hide real problems when used too widely.

Syntax

=IFERROR(value, [value_if_error])
Switch to the Excel page

Arguments

ArgumentRequiredMeaning
valueYesThe formula to test.
value_if_errorYes in ExcelThe result to show on error. Optional in Sheets.

Worked example

AB
1RevenueUnits
2120040
39000
=IFERROR(A3/B3,0)
Result: 0

Dividing 900 by 0 returns #DIV/0!, so IFERROR shows 0 instead.

Try it

Edit the formula and run it against the table above. Results come from a browser spreadsheet engine.

Availability

PlatformStatus
ExcelAll current desktop versions, Microsoft 365, Excel for the web.
Google SheetsAvailable.

Common mistakes

  • It hides every error type, including a misspelled name or a broken reference.
  • Use IFNA when only a missing lookup value should be handled.

Do it with AI

Paste this prompt into Copilot, Gemini or another assistant. Check the result on a small sample first.

Wrap this formula so only a missing lookup shows "Not listed", and every other error stays visible: =VLOOKUP(F2,A2:C5,3,FALSE)