IFERROR vs IFNA, Which Errors Should You Hide?

Last edited Oct 18, 2026 · 3 min read

Use IFNA when you only want to replace "not found" (#N/A), and IFERROR when any failure should show the same fallback. In Microsoft's documentation IFERROR evaluates seven error types and IFNA evaluates one, so IFNA leaves every other error visible.

1. What each function catches

Microsoft documents IFERROR as IFERROR(value, value_if_error). It evaluates these error types: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, and #NULL!. If the formula is fine, you get its result; if it is any of those errors, you get the replacement.

IFNA, documented as IFNA(value, value_if_na), checks only for #N/A. Any other error passes through unchanged. Google Sheets has both functions: its IFNA help page says it returns the specified value when the first argument is an #N/A error, and its IFERROR page says the second value is returned for any error value.

One difference in Google Sheets: the second argument of IFERROR is optional and defaults to blank, so IFERROR(A2) shows an empty cell on error. In Excel's documentation both arguments are required.

2. Example 1: division

Microsoft's IFERROR example uses a Quota column and a Units Sold column:

Quota Units sold Formula Result
210 35 =IFERROR(A2/B2, "Error in calculation") 6
55 0 =IFERROR(A3/B3, "Error in calculation") Error in calculation
(blank) 23 =IFERROR(A4/B4, "Error in calculation") 0

Row 1 is 210 divided by 35, which is 6. Row 2 divides by zero, so you get the fallback text. Row 3 has a blank quota, which Microsoft treats as an empty string (""); the page shows 0 and no error.

Here IFERROR is a reasonable choice, since #DIV/0! is the only error this formula can really produce. If you want to total the results, returning text will make later math awkward. A number such as 0 (or an empty string, depending on your sheet) keeps the totals working. With the fallback set to 0 the three results are 6, 0 and 0, which total 6.

3. Example 2: a lookup, where the choice matters

Microsoft's IFNA example wraps VLOOKUP: Seattle is not in the lookup range, VLOOKUP returns #N/A, and IFNA shows "Not found" instead. That is the exact case IFNA was made for. A missing key is a normal result of a lookup, and the message is accurate.

Now consider the same formula wrapped in IFERROR. It still shows "Not found" for a missing key. But Microsoft's list of IFERROR error types includes #NAME? and #REF!, which are not "not found" results:

  • #NAME? is on IFERROR's list, so IFERROR would replace it with the fallback text.
  • #REF! is on the list too, so IFERROR would replace it as well.
  • IFNA checks only #N/A, so it would leave #NAME? and #REF! unchanged.

Because IFNA passes other errors through, it is the narrower choice around a lookup.

4. Google's note on how IFERROR works

Google's IFERROR page says IFERROR(exp1, exp2) is logically equivalent to IF(NOT(ISERROR(exp1)), exp1, exp2) and asks you to "ensure that this is the desired behavior." In plain terms: every error is treated the same, whatever the cause.

The page also lists ISNA, ISERROR and ISERR as related checks. ISERR checks for errors other than #N/A, which is the mirror image of IFNA.

5. Choosing between them

Situation Better choice Reason
VLOOKUP or MATCH where a missing key is normal IFNA Shows a message only for "not found"
Division where the divisor may be zero IFERROR (or test the divisor with IF) #DIV/0! is the expected error
Large report with many nested parts Neither at first Let errors show while you build, add wrapping last
Result feeds other formulas Return a number, not text Text can break later sums

One approach: build and test the formula with no wrapper, see which error it returns, and add IFNA or IFERROR only after that.

Function behavior above follows the Microsoft and Google help pages as read in October 2026.

6. Key takeaways

  • In Microsoft's documentation IFERROR replaces seven error types: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? and #NULL!.
  • IFNA replaces only #N/A, so #NAME? and #REF! stay visible.
  • For lookups, IFNA is the safer wrapper. For division by zero, IFERROR is fine.
  • Pick fallback values that suit later math: in the example, results of 6, 0 and 0 total 6.
  • In Google Sheets, IFERROR's second argument is optional and defaults to blank.

Sources

  1. Microsoft Support, IFERROR function
  2. Microsoft Support, IFNA function
  3. Google Docs Editors Help, IFERROR
  4. Google Docs Editors Help, IFNA function
CategoriesSpreadsheet Diaryexcelgoogle sheetsformulas

More on work & tech from other topics