Formula Guide

The Excel IFNA Function
explained simply

IFNA catches specifically the #N/A error and replaces it with something else — more targeted than IFERROR, which catches every error type.

ExcelPro · 4 min read · Updated June 2026
Contents
  1. What does IFNA do?
  2. Syntax
  3. 3 examples
  4. IFNA vs IFERROR
  5. FAQ

What does IFNA do?

IFNA checks if a formula results in the #N/A error specifically — the error VLOOKUP, MATCH, and XLOOKUP throw when nothing matches — and returns a fallback value if so.

Unlike IFERROR, it lets other error types (like #DIV/0! or #VALUE!) through unchanged, so you only mask the specific "not found" case rather than hiding every possible mistake.

Syntax

=IFNA(value, value_if_na)
ArgumentDescription
value requiredThe formula or value to check.
value_if_na requiredWhat to return if value evaluates to #N/A.

Examples

Example 1
Replace #N/A with a custom message
=IFNA(VLOOKUP(A2,B:C,2,FALSE),"Not found")

If the VLOOKUP fails to find A2, this shows "Not found" instead of #N/A — but other errors, like a malformed range, would still display normally.

Example 2
Replace #N/A with 0 for a calculation
=IFNA(MATCH(A2,B:B,0),0)

Useful when a missing match should be treated as a count of zero, not break a downstream formula.

Example 3
Chain after XLOOKUP
=IFNA(XLOOKUP(A2,B:B,C:C),"No match")

XLOOKUP also returns #N/A when nothing matches, so IFNA works the same way here.

IFNA vs IFERROR — which to use

SituationUse
Only want to catch "not found" lookupsIFNA
Want to catch every possible error typeIFERROR

IFERROR is more forgiving but can accidentally hide real mistakes — like a #DIV/0! caused by a genuine formula bug — by quietly replacing them with your fallback value. IFNA is more precise and safer when you only expect "not found" to be a normal, acceptable outcome.

Common mistakes

⚠️ Using IFNA when you actually want to catch every error

If you genuinely want to hide all error types, not just #N/A, use IFERROR instead.

FAQ

Does IFNA work with formulas other than lookups?
It works with anything that can return #N/A, though lookup functions are by far the most common source.

Practise Excel with real data

ExcelPro has 700+ hands-on Excel exercises across 7 career tracks — free to start, no download needed.

Start practicing free →

Related formulas

IFERROR VLOOKUP XLOOKUP MATCH