LocalExcelTool
Get started

Excel IFNA function

IFNA handles exactly one error: #N/A, meaning "not found". For lookups it is safer than IFERROR, because a mistyped range (#REF!) or an out-of-range column index (#VALUE!) still shows up instead of quietly becoming blank.

Logic · Available in: Excel 2013 and later

Syntax

IFNA(value, value_if_na)

What it returns The value, unless it is #N/A — then the second argument. Other errors pass through.

Arguments
valuerequiredThe expression to guard, usually a lookup.
value_if_narequiredWhat to return when the result is #N/A.

Examples

Show "Not listed" instead of #N/A

SKUProduct
A-100Standing desk
= IFNA(XLOOKUP("X-1",A2:A2,B2:B2),"Not listed")

→ Not listed

XLOOKUP returns #N/A for a missing key and IFNA replaces it with Not listed. If the lookup array were the wrong size and produced #VALUE!, IFNA would let that error through — which is exactly the behaviour you want.

Common mistakes

  • 1.Expecting it to catch #DIV/0!. It only recognises #N/A; other errors come back unchanged.
  • 2.Not available before Excel 2013 — older files show #NAME?.
  • 3.Wrapping a whole report in it: the #N/A disappears, but so does the signal that the lookup points the wrong way.

How to use it

  1. 1.Click the cell where the result should appear.
  2. 2.Type = then the function name, and press Tab to accept it.
  3. 3.Enter each argument separated by commas; ranges can be dragged with the mouse.
  4. 4.Press Enter. Drag the fill handle down if the same formula applies to more rows.

Frequently asked questions

What is the syntax of IFNA?

IFNA(value, value_if_na). What it returns: The value, unless it is #N/A — then the second argument. Other errors pass through.

Which Excel versions support IFNA?

Excel 2013 and later. It is available in every desktop version unless the note above says otherwise.

Why does IFNA return an error instead of a value?

Expecting it to catch #DIV/0!. It only recognises #N/A; other errors come back unchanged.

Related functions

More in this group

Need to get the data in first?

← All Excel formulas