IFNA Function

Replaces only the #N/A error — usually 'not found' from a lookup.

Category

Logical

Available in

Excel 2013+, Microsoft 365

Returns

The formula's result, or your fallback if it's #N/A

Taught hands-on in Level 3: Intermediate Lookups & Data Summaries - Errors & Error Handling module

Overview

IFNA is IFERROR with a narrower focus. It only steps in when the result is #N/A, which is what lookups return when a value can't be found.

Every other error still shows, so genuine mistakes in the formula aren't hidden.

Syntax

=IFNA(value, value_if_na) Explain

Arguments

ArgumentRequired?What it does
valueYesThe formula to check — typically a lookup.
value_if_naYesWhat to return if value is #N/A.

Examples

Example 1 — Product not in the list

P-104 isn't in the price list, so show a message instead of #N/A.

E2fx=IFNA(VLOOKUP(D2, A2:B4, 2, FALSE), "Not found")
ABCDE
1CodePriceFindPrice
2P-10112.50P-104Not found
3P-1028.00
4P-10315.00
=IFNA(VLOOKUP(D2, A2:B4, 2, FALSE), "Not found") Explain

Example 2 — Fallback to a second list

Look in this year's price list, and if the code isn't there, try last year's.

=IFNA(XLOOKUP(D2, Prices2026[Code], Prices2026[Price]), XLOOKUP(D2, Prices2025[Code], Prices2025[Price])) Explain

Common mistakes

  • Other errors still appear. That's by design. A #REF! means the formula itself needs fixing.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.