In Excel: use =IFNA(value, value_if_na) — it catches #N/A only, letting genuine formula errors surface instead of hiding them.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
value | required | The formula to evaluate. |
value_if_na | required | What to return if it produces #N/A. Every other error passes through. |
Related functions
Write the lookup first and confirm it works on a row you know exists.
Wrap it: type =IFNA( before the formula and add a comma at the end.
Enter the fallback — a message, a dash, or 0 depending on what downstream formulas expect.
Test a deliberately missing value to confirm the fallback appears.
What this does
IFNA substitutes a value when a formula returns #N/A, and leaves every other error untouched. That narrowness is exactly why it is preferable to IFERROR around a lookup: #N/A means "not found", which is an ordinary outcome worth handling, while #REF! or #NAME? in the same formula means something is broken and should be visible. Wrapping a lookup in IFERROR suppresses both, so a lookup that breaks when someone deletes a column keeps returning your friendly fallback forever. Requires Excel 2013 or later. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “ifna function in excel”. Start on a copy or a tiny sample, keep the affected formula visible, and compare the result with the outcome you expected before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a workflow that saves repeating the same clicks every week, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
A product lookup that may legitimately miss: =IFNA(VLOOKUP(A2, Catalogue, 3, FALSE), "Not in catalogue") shows the message for unknown products but still shows #REF! if the Catalogue range is deleted. The same formula with IFERROR would show "Not in catalogue" in both cases, hiding the broken reference indefinitely. IFNA handles the expected failure without hiding the unexpected one, which is the whole distinction good error handling rests on. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. For “ifna function in excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
Common mistakes
- Reaching for
IFERRORout of habit around a lookup, which also swallows the errors that indicate real breakage. - Returning 0 as the fallback where the value feeds a
SUM, which understates the total without saying so. - Using it in Excel 2010 or earlier, where it does not exist.
Frequently asked questions
What is the difference between IFNA and IFERROR?
IFNA catches only #N/A. IFERROR catches every error, including the ones that mean your formula is broken.
Which should I use around a VLOOKUP?
IFNA. A missing value is expected and worth handling; a #REF! from a deleted column is not, and you want to see it.
Does XLOOKUP need IFNA?
No — XLOOKUP has a built-in if_not_found argument that does the same job more directly.