formulastreak

IFERROR vs IFNA

Updated · Works in: Excel 2013+, Microsoft 365, Google Sheets · Every example checked before release

Short answer

IFNA(value, value_if_na) catches only #N/A, the lookup's “not found”, so a broken formula still shows its error. IFERROR(value, value_if_error) hides every error. Use IFNA around lookups.

Use IFNA around lookups and IFERROR only when every error really means the same thing. IFNA (value, value_if_na) replaces #N/A, the “not found” result of a lookup, and lets every other error through. IFERROR (value, value_if_error) replaces any error, including the ones that mean your formula is broken.

IFERRORIFNA
CatchesEvery error (#N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, #NULL!)Only #N/A
Typical useA division that may hit 0, when 0 or blank is the right displayLookups where “not found” is expected
ExcelEvery current versionExcel 2013 and later
Google SheetsYes (second argument optional)Yes

The danger: IFERROR hides a broken formula

This lookup asks for column 5 of a 4-column table, so every row is really #REF!. Wrapped in IFERROR, every row says “Not found”, and nobody can tell that the formula itself is wrong. Microsoft's IFERROR page lists the errors it catches; #REF! is one of them.

Orders and price list · edit D2 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultD2 = Not found
ABCDEFGHIJ
1OrderSKUQtyStockSKUProductPriceStock
22001PL-1042Not foundPL-101Fern$9.5040
32002PT-2101Not foundPL-104Monstera$34.0012
42003TL-3013Not foundPL-107Snake plant$22.0025
52004PL-1011Not foundPT-210Terracotta pot$12.5060
62005SL-4014Not foundPT-212Ceramic pot$19.0018
72006PL-1041Not foundTL-301Watering can$18.009
82007PT-2122Not foundSL-401Potting mix$7.2580
92008PL-1071Not found

IFNA keeps real errors visible

The same broken lookup inside IFNA shows #REF! on every row, which is what you want: it's telling you to fix the column number. With a correct column, IFNA shows “Not found” only for the SKU that really isn't in the price list (PL-999) and leaves everything else alone.

Orders and price list · edit D2 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultD2 = Monstera
ABCDEFGHIJ
1OrderSKUQtyProductSKUProductPriceStock
22001PL-1042MonsteraPL-101Fern$9.5040
32002PT-2101Terracotta potPL-104Monstera$34.0012
42003TL-3013Watering canPL-107Snake plant$22.0025
52004PL-1011FernPT-210Terracotta pot$12.5060
62005SL-4014Potting mixPT-212Ceramic pot$19.0018
72006PL-1041MonsteraTL-301Watering can$18.009
82007PT-2122Ceramic potSL-401Potting mix$7.2580
92008PL-9991Not found

When IFERROR is the right tool

Some errors are expected and harmless: a conversion rate for a campaign with no clicks divides by zero. IFERROR(C2/B2, "") shows a blank instead. Even here, testing the cause is often clearer, IF(B2=0, "", C2/B2), because a typo would still show; the IFERROR guide compares both, and the #DIV/0! page has more.

Marketing campaigns · edit D2 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultD2 = 3.0%
ABCDE
1CampaignClicksSalesConversionOwner
2Spring email1200363.0%Mara
3Instagram860121.4%
4Display ads00Jonas
5Search ads2300693.0%Priya
6Newsletter540275.0%
7Partner blog00Kenji

Which should a beginner learn first?

Learn both together, because the difference is the lesson. Default to IFNA around VLOOKUP, XLOOKUP and MATCH, and reach for IFERROR only when you can say which errors you expect and why hiding all of them is safe. In Excel 2021 or later and Google Sheets, XLOOKUP's own fourth argument replaces IFNA for lookups. For the whole lookup pattern step by step, with a worked example and the common mistakes, see how to use IFERROR with VLOOKUP.

Check yourself

One real exercise from the “Decisions” unit. Checked on our server; no account needed.

Now the quick catch-all: show each campaign's conversion (Sales ÷ Clicks) in D2, or an empty cell ("") if the division fails, using IFERROR.

  • Use IFERROR
Select D2 and type = to start its formula (in the cell or the formula bar)
ABCDE
1CampaignClicksSalesConversionOwner
2Spring email120036Mara
3Instagram86012
4Display ads00Jonas
5Search ads230069Priya
6Newsletter54027
7Partner blog00Kenji

Common mistakes

  • Wrapping every lookup in IFERROR, which turns a wrong column number or a deleted range into a believable “Not found”.

  • Leaving out IFERROR's second argument in Excel, where it's required (Google Sheets allows it).

  • Hiding an error before finding out why it happens.

Questions

Does IFERROR catch #SPILL! and #CALC!?+

Microsoft's IFERROR page lists #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? and #NULL!; #SPILL! and #CALC! aren't on the list.

Is IFNA in Google Sheets?+

Yes: IFNA(value, value_if_na), the same as Excel's.

Reading is step one. Now make it stick.

Practise it in a five-minute lesson on a live sheet, with instant feedback. No account needed for the free units.

Practise IFERROR and IFNA in the course

Sources

Official documentation the facts on this page were checked against.