How to Use IFNA Function in Excel Step-by-Step with Examples

Learn how to use IFNA function in Excel. Simple step-by-step tutorial with examples.

Advertisement
Formula
=IFNA(value, value_if_na)

Hello everyone! Today i will show you how to use IFNA function in Excel step by step.

What is IFNA Function in Excel?

When you search data using lookup formulas like VLOOKUP, MATCH, or LOOKUP, Excel will return ugly #N/A error if the item is not in your list!

The IFNA function help you catch only #N/A error and replace it with clean custom message like "Not Found", "Out of Stock", or 0!

📚 Related Tutorial: Want to catch ALL types of errors in Excel (like #DIV/0!, #VALUE!, #REF!)? Check out How to Use IFERROR Function in Excel!

🛠️ Formula Syntax

=IFNA(value, value_if_na)
  • value: The formula or cell value you want to test (example: VLOOKUP(E2, A2:C4, 2, FALSE)).
  • value_if_na: What text or number to display if the formula result is #N/A (example: "Not Found" or 0).

📋 Sample Data Table (Follow Along)

To follow all examples easily, create this simple product table in your Excel sheet:

RowColumn A (Product ID)Column B (Item Name)Column C (Price)
1Product IDItem NamePrice
2P101Laptop$800
3P102Mouse$15
4P103Keyboard$35

💡 Search Target: We put our lookup ID in Cell E2 = "P999" (which does NOT exist in table!).

Advertisement

📊 Simple Examples

Example 1: Clean VLOOKUP Result (Replace #N/A with "Not Found")

Without IFNA:

=VLOOKUP(E2, A2:C4, 2, FALSE)

👉 If E2 = "P999", Excel returns ugly error: #N/A

With IFNA:

=IFNA(VLOOKUP(E2, A2:C4, 2, FALSE), "Not Found")

👉 If E2 = "P999", Excel cleanly shows: "Not Found"


Example 2: Return 0 instead of #N/A for Price Calculation

If item is not found, we want return price 0 so math calculation won't break:

=IFNA(VLOOKUP(E2, A2:C4, 3, FALSE), 0)

Example 3: Use IFNA with MATCH Function

=IFNA(MATCH(E2, A2:A4, 0), "Item Not in List")

If "P999" is not in list, instead of #N/A error, Excel will display "Item Not in List".

Example 4: Show blank cell instead of error

If you want cell to look empty when item is missing, use empty double quote "":

=IFNA(VLOOKUP(E2, A2:C4, 2, FALSE), "")

⚖️ IFNA vs IFERROR: What is Difference?

FunctionWhat Error It CatchesBest Choice When...
IFNAONLY #N/A (Not Available)You use VLOOKUP/MATCH and ONLY want to catch missing items, but still want to see real formula typos or syntax errors!
IFERRORALL Errors (#N/A, #DIV/0!, #VALUE!, #REF!, #NAME?)You want to hide any type of error in your calculation.

💡 Quick Tip:
Why IFNA is safer than IFERROR for lookups?
If you make a typing mistake in your formula (like spelling VLOOKUP wrong as VLOOKU), IFERROR will hide your typo and show "Not Found". But IFNA will NOT hide your typo error! It only catches #N/A when item is genuinely missing.


📚 Related Resources & Tutorials

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement