Logical function

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)
ArgumentWhat it means
valueRequiredThe formula to check, typically a lookup such as VLOOKUP or MATCH.
value_if_naRequiredWhat 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

E2fx=IFNA(VLOOKUP(1050, A2:C4, 3, FALSE), "Not on payroll")
ABCDE
1IDNameDepartment
21041Elena PappasFinanceNot on payroll
31042Marc WeberSales
41043Ines CostaIT

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

C2fx=IFNA(MATCH("Lee", A2:A5, 0), 0)
ABC
1Shortlist
2Garcia0
3Novak
4Okafor
5Lind

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.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 14 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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/A for 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.

LanguageFunction name
DanishHVISIT
DutchALS.NB
FinnishJOSPUUTTUU
FrenchSI.NON.DISP
GermanWENNNV
HungarianHAHIÁNYZIK
ItalianSE.NON.DISP.
Norwegian (Bokmål)HVIS.IT
PolishJEŻELI.ND
Portuguese (Brazil)SENÃODISP
Portuguese (Portugal)SEND
RussianЕСНД
SpanishSI.ND
SwedishOMSAKNAS
TurkishEĞERYOKSA