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.
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"or0).
📋 Sample Data Table (Follow Along)
To follow all examples easily, create this simple product table in your Excel sheet:
| Row | Column A (Product ID) | Column B (Item Name) | Column C (Price) |
|---|---|---|---|
| 1 | Product ID | Item Name | Price |
| 2 | P101 | Laptop | $800 |
| 3 | P102 | Mouse | $15 |
| 4 | P103 | Keyboard | $35 |
💡 Search Target: We put our lookup ID in Cell
E2="P999"(which does NOT exist in table!).
📊 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?
| Function | What Error It Catches | Best Choice When... |
|---|---|---|
IFNA | ONLY #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! |
IFERROR | ALL Errors (#N/A, #DIV/0!, #VALUE!, #REF!, #NAME?) | You want to hide any type of error in your calculation. |
💡 Quick Tip:
WhyIFNAis safer thanIFERRORfor lookups?
If you make a typing mistake in your formula (like spellingVLOOKUPwrong asVLOOKU),IFERRORwill hide your typo and show"Not Found". ButIFNAwill NOT hide your typo error! It only catches#N/Awhen item is genuinely missing.
📚 Related Resources & Tutorials
Related Tutorials
Opens in new tab ↗How to Use COUNTIF and COUNTIFS Function in Excel (Video in Khmer)
Learn how to use COUNTIF and COUNTIFS function in Excel step-by-step with simple examples and videos in Khmer.
How to Use DAVERAGE Function in Excel + Tips (Video in Khmer)
Learn how to use DAVERAGE function in Excel step-by-step to find the average numbers in a table database matching specific conditions.
How to Use DSUM Function in Excel + Tips (Video in Khmer)
Learn how to use DSUM function in Excel step-by-step to sum numbers in a table database matching specific conditions.