ExcelFluent
Start free

How to use IFERROR in Excel

IFERROR returns your formula's result, or a value you choose if the formula gives an error. It turns #DIV/0! into 0 and #N/A into "Not found".

Syntax

=IFERROR(value, value_if_error)
value
The formula to try.
value_if_error
What to show instead of an error: 0, "" or a message in quotes.

Try it now · free, no sign-up

Clean up errors

  1. In D2, divide Revenue by Units, but show 0 instead of #DIV/0! when Units is 0. It will be copied down.
  2. In G2, look up the revenue for the item in F2. Scissors is not in the list, so show Not found.
ABCDEFG
1ItemRevenueUnitsPer unitFind itemRevenue
2Notebooks450.0030Scissors
3Pens0.000
4Backpacks900.0020
5Binders0.000
6Markers96.0024

Loading the live spreadsheet…

IFERROR or IFNA?

IFERROR hides every error, including ones that point to a real mistake such as a misspelled function (#NAME?). IFNA only catches #N/A, which is safer for lookups. In XLOOKUP, use its own fourth argument instead.

Common mistakes

Hiding real mistakes
Wrap a formula in IFERROR only after you have checked it works. Otherwise a broken formula quietly shows 0.
Text without quotes
Write "Not found", not Not found.

Practice it until it sticks

ExcelFluent has 42 hands-on lessons, from SUM to XLOOKUP, plus 5 real work projects and a final challenge that uses everything. Every answer is checked instantly. The first 5 lessons and 1 work project (an invoice with tax) are free.

Start the free lessons → Open the full IFERROR lesson

Frequently asked questions

Does IFERROR slow down Excel?

Not noticeably for normal sheets.

Which Excel errors does IFERROR catch?

#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? and #NULL!.

Related practice