# IFERROR vs IFNA in Excel

> 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.

Source: https://spreadsheetpractice.com/functions/compare/iferror-vs-ifna · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

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

|  | IFERROR | IFNA |
|---|---|---|
| Errors caught | All: #N/A, #DIV/0!, #VALUE!, #REF!, #NAME? and more | Only #N/A |
| Typical use | Divisions and messy imports where any error means "blank" | Lookups where "not found" is expected |
| Risk | Can hide broken references and typos | Lets real mistakes stay visible |
| Available in | Every version | Excel 2013 and later |

## Same data, side by side

Each result was calculated by running the formula on the sample sheet.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| E2 | `=IFNA(VLOOKUP(D2,A2:B4,2,FALSE),"Not found")` | Not found | IFNA turns a missing code into a message |
| E3 | `=IFERROR(VLOOKUP(D2,A2:B4,2,FALSE),"Not found")` | Not found | IFERROR 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 |

### The sample sheet

Every formula above runs on this data:

|  | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Code | Price |  | Look up | Result |
| 2 | A1 | $12 |  | Z9 | Not found |
| 3 | B2 | $0 |  |  | Not found |
| 4 | C3 | $30 |  |  | #DIV/0! |

## 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.

## The functions

- [IFERROR](https://spreadsheetpractice.com/functions/iferror): IFERROR returns a value you choose when a formula results in an error, and the formula's normal result otherwise. Every current version.
- [IFNA](https://spreadsheetpractice.com/functions/ifna): IFNA 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.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
