In Excel: use =IFNA(value, value_if_na) — it catches #N/A only, letting genuine formula errors surface instead of hiding them.
Syntax
Arguments
| Argument | 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 tool above 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. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. Here is the takeaway for “ifna function in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.
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.