Logical

IFNA Formula

IFNA specifically catches #N/A errors and returns an alternative value, while letting all other error types pass through normally. It is designed for lookup formulas (VLOOKUP, INDEX-MATCH, XLOOKUP) where #N/A means the value was not found, but you still want to see other errors that indicate real formula problems.

Syntax

IFNA(value, value_if_na)
ParameterDescription
value Parameter of the IFNA function.
value_if_na Parameter of the IFNA function.
Try IFNA in Viztab — free, no signup

Examples

Handle VLOOKUP not found

Formula
=IFNA(VLOOKUP(A2, D:E, 2, FALSE), "No match")
Returns: the lookup result, or "No match" for #N/A — but still shows #REF! or #VALUE! if those occur

Default value for missing lookups

Formula
=IFNA(MATCH(A2, B:B, 0), 0)
Returns: the match position, or 0 if the value is not found

Chain lookups with IFNA

Formula
=IFNA(VLOOKUP(A2, Sheet1!A:B, 2, 0), VLOOKUP(A2, Sheet2!A:B, 2, 0))
Returns: tries the first lookup, and if not found, tries the second table

Common Errors

#N/A (still shown)

The IFNA's own alternative formula is producing #N/A. Check both the primary and fallback expressions.

Tips

IFNA vs IFERROR

IFNA only catches #N/A. IFERROR catches everything. Use IFNA for lookups so real errors (like #REF! from deleted columns) are not hidden.

XLOOKUP has built-in IFNA

If you have XLOOKUP, its 4th argument does the same thing as wrapping with IFNA, making the formula cleaner.

Better debugging

Using IFNA instead of IFERROR means formula errors still surface, making it easier to find and fix broken references.

Try IFNA in Viztab

Import your data and use IFNA with 370+ other formulas. No signup required.

Open Viztab

Related Formulas