Function · Logical

Excel IFNA function

The Excel IFNA function replaces only #N/A. A lookup of WY in the five-state rate table becomes Add this state. A #REF! still shows.

Excel 2013 and later, including Microsoft 365 and Excel for the web. Also in Google Sheets.

Syntax =IFNA(value, value_if_na)

IFNA
=IFNA(VLOOKUP("WY",A2:B6,2,FALSE),"Add this state")

Arguments

NameRequiredWhat to pass
valueRequiredThe formula to try.
value_if_naRequiredWhat to return when value is #N/A. Any other error is returned as itself.

Examples

Wyoming is not in the five-state rate table

=IFNA(VLOOKUP("WY",A2:B6,2,FALSE),"Add this state")

Result Add this state

=IFNA(VLOOKUP(D2,A2:B6,2,FALSE),"Add this state")D3
Missing state
ABCD
1StateRateLookup
2CA7.25%WY
3FL6.00%Add this state
4MA6.25%
5NY4.00%
6TX6.25%
A picture of the sheet, not a live calculator. Statewide rates only, Tax Foundation table of January 1, 2026. WY is not in column A.

IFNA runs a formula and steps in only when the result is #N/A. VLOOKUP of WY in a table of CA, FL, MA, NY, and TX is #N/A, and the wrapper returns Add this state. Those are the same statewide rates used on the VLOOKUP page, from the Tax Foundation table of January 1, 2026. Local tax is often extra.

IFERROR would also return the message, and it would do the same for #REF!, #NAME?, and #DIV/0!. A typo in the function name then looks like a missing state. IFNA leaves those alone. XLOOKUP can carry the fallback itself, so a workbook that already has XLOOKUP does not need this wrapper for a simple miss.