Spreadsheet Practice

IFERROR vs IFNA

Both replace an error with something friendlier. IFNA only catches #N/A, the "not found" error from lookups; IFERROR catches every error, including ones that point to real mistakes. Prefer IFNA around lookups so genuine problems still show.

The differences

FeatureIFERRORIFNA
Errors caughtAll: #N/A, #DIV/0!, #VALUE!, #REF!, #NAME? and moreOnly #N/A
Typical useDivisions and messy imports where any error means "blank"Lookups where "not found" is expected
RiskCan hide broken references and typosLets real mistakes stay visible
Available inEvery versionExcel 2013 and later

Same data, side by side

One sample sheet, each approach in its own cell. Results are calculated by our formula engine.

CellFormulaResultWhat it shows
E2=IFNA(VLOOKUP(D2,A2:B4,2,FALSE),"Not found")Not foundIFNA turns a missing code into a message
E3=IFERROR(VLOOKUP(D2,A2:B4,2,FALSE),"Not found")Not foundIFERROR does the same for a missing code
E4=IFNA(100/B3,"Not found")#DIV/0!IFNA lets the #DIV/0! error through, so the real problem stays visible

Try it live

Change the inputs or rewrite a formula and compare the results.

When to use each

Choose IFERROR when

Any error should become a blank or zero, such as a ratio where the denominator can be empty.

Choose IFNA when

You're wrapping a lookup. A missing match is expected; a #REF! from a deleted column is not, and you want to see it.

Practice IFNA

Graded instantly, then re-checked on changed data.

Line totals with missing SKUs

In F2, return the line total: the SKU's price from the list times the quantity, or 0 when the SKU isn't in the price list. Use IFNA, then fill down to F5.

The functions

  • IFERRORIFERROR returns a value you choose when a formula results in an error, and the formula's normal result otherwise. Every current version.
  • IFNAIFNA returns a fallback only when a formula results in #N/A, the error lookups give when a value is missing. Excel 2013 and later.

Questions

Is it bad practice to use IFERROR?

Not when it's deliberate. The risk is wrapping a whole formula so broken references and typos quietly turn into blanks.

Does XLOOKUP need IFNA?

No. Use its fourth argument, if_not_found, instead.

Last reviewed October 2026.