IFNA function
Returns a value you specify when a formula gives #N/A, and the formula's result otherwise. Catches only #N/A, so other errors stay visible.
Available in Excel 2013 and later, Microsoft 365, Excel for the web
Excel 2013 and laterWorks in Google Sheets
Syntax
IFNA(value, value_if_na)| Argument | What it means | |
|---|---|---|
value | Required | The formula to check, typically a lookup such as VLOOKUP or MATCH. |
value_if_na | Required | What to return if value is #N/A. |
Returns: The result of value, or value_if_na when that result is #N/A.
How IFNA works
IFNA is the precise cousin of IFERROR. It only steps in when the result is #N/A — the error lookup functions return when a value is not in the list. Any other error, such as #REF! from a deleted column or #NAME? from a typo, passes straight through so you notice it.
That makes it the right wrapper for VLOOKUP, HLOOKUP, MATCH and INDEX/MATCH combinations. You write the lookup once and decide what a "missing" result should look like: a message, 0, an empty string or a second lookup in another table. XLOOKUP has its own if_not_found argument, so it seldom needs IFNA.
Examples
1Show a message for unknown employee IDs
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | ID | Name | Department | ||
| 2 | 1041 | Elena Pappas | Finance | Not on payroll | |
| 3 | 1042 | Marc Weber | Sales | ||
| 4 | 1043 | Ines Costa | IT |
Result: Not on payroll
ID 1050 does not exist, so VLOOKUP returns #N/A and IFNA replaces it with the message. Looking up 1042 instead returns Sales.
2Position in a list, or 0 if missing
| A | B | C | |
|---|---|---|---|
| 1 | Shortlist | ||
| 2 | Garcia | 0 | |
| 3 | Novak | ||
| 4 | Okafor | ||
| 5 | Lind |
Result: 0
MATCH cannot find Lee, which gives #N/A; IFNA turns it into 0. For Okafor it would return 3, its position in the list.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#REF!, #VALUE!, ... | IFNA deliberately does not catch errors other than #N/A. | Fix the underlying formula, or use IFERROR if you really want to hide every error. |
Tips
- Chain lookups:
=IFNA(VLOOKUP(A2, Current, 2, FALSE), VLOOKUP(A2, Archive, 2, FALSE))tries a second table when the first has no match. - A lookup that returns
#N/Afor a value you can see in the list usually means extra spaces or numbers stored as text — check with TRIM and ISNUMBER before hiding the error.
Google Sheets
IFNA also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
IFNA in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | HVISIT |
| Dutch | ALS.NB |
| Finnish | JOSPUUTTUU |
| French | SI.NON.DISP |
| German | WENNNV |
| Hungarian | HAHIÁNYZIK |
| Italian | SE.NON.DISP. |
| Norwegian (Bokmål) | HVIS.IT |
| Polish | JEŻELI.ND |
| Portuguese (Brazil) | SENÃODISP |
| Portuguese (Portugal) | SEND |
| Russian | ЕСНД |
| Spanish | SI.ND |
| Swedish | OMSAKNAS |
| Turkish | EĞERYOKSA |