Excel function · Lookups
IFNA
Replaces only the #N/A error with your own result.
What it does
IFNA works like IFERROR but catches only #N/A, the error lookups give when they find nothing. Other errors still show, so real problems stay visible.
Syntax
=IFNA(value, value_if_na)Arguments in square brackets are optional, and … means you can add more of the same. In this Excel language, arguments are separated by ,
Arguments
- value
- The formula that might return #N/A, usually a lookup.
- value_if_na
- What to show when it does.
Example
Look up the price of code P40, which isn't in the list.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Code | Price | Look for | Price | |
| 2 | P10 | 4 | P40 | not found | |
| 3 | P20 | 7 | |||
| 4 | P30 | 3 |
The formula in E2:
=IFNA(VLOOKUP(D2,A2:B4,2,FALSE),"not found")Result: not found
P40 isn't in A2:A4, so VLOOKUP returns #N/A and IFNA swaps it for "not found".
Common mistakes
- Expecting it to hide every error. A column number that's too big gives #REF!, which
IFNAlets through. - Wrapping the wrong part. Put the whole lookup inside
IFNA, not just the value it looks for.
In other Excel languages
Excel translates function names, and in some languages the argument separator too. Type the name your Excel shows.
| Excel language | Function name | Separator |
|---|---|---|
| English | IFNA | , |
| Deutsch | WENNNV | ; |
| Français | SI.NON.DISP | ; |
| Español (España) | SI.ND | ; |
| Español (México) | SI.ND | , |
| 日本語 | IFNA | , |
| 한국어 | IFNA | , |
| 繁體中文 | IFNA | , |
| ไทย | IFNA | , |
| ខ្មែរ | IFNA | , |
| Tiếng Việt | IFNA | ; |