IFERROR vs IFNA
IFERROR catches any error; IFNA only the "not found" #N/A.
| IFERROR | IFNA | |
|---|---|---|
| Catches #N/A | Yes | Yes |
| Catches #DIV/0!, #NAME?, #REF! | Yes | No |
| Risk | Hides real formula mistakes | None: other errors stay visible |
Syntax and example
IFERROR
=IFERROR(value, value_if_error)
=IFERROR(B2/C2,0)
Returns a formula’s result or, if it returns any error, the value you choose.
IFNA
=IFNA(value, value_if_na)
=IFNA(VLOOKUP(D2,$A$2:$B$6,2,FALSE),"No price")
Returns an alternative value only when the formula returns #N/A (not found).
Which one to use?
With lookups, IFNA: a misspelled function name will not be hidden. IFERROR for divisions and calculations that can fail in several ways.
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice it
Solve the exercise on the sheet; it is checked instantly. See all lessons · Formula translator
IFNA
IFNA is like IFERROR, but it only catches #N/A, the "not found" error. That way you do not hide other errors you do want to see.
=IFNA(VLOOKUP(D2,$A$2:$B$6,2,FALSE),"Sin precio")SI.ND = IFNABUSCARV = VLOOKUPBUSCARX = XLOOKUPINDICE = INDEXIn E2, look up the price for the code in D2. If it does not exist, show "No price".
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Code | Price | Find | Price | ||
| 2 | P-101 | 1,299 | P-103 | |||
| 3 | P-102 | 189 | P-110 | |||
| 4 | P-103 | 95 | P-105 | |||
| 5 | P-104 | 459 | P-999 | |||
| 6 | P-105 | 239 | ||||
| 7 |
Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.
Frequently asked questions
- What is the difference between IFERROR and IFNA?
- IFERROR catches any error; IFNA only the "not found" #N/A.
- When should I use IFERROR or IFNA?
- With lookups, IFNA: a misspelled function name will not be hidden. IFERROR for divisions and calculations that can fail in several ways.