Category: FUNCTION | Updated: 2026-11-22

How to Use the IFNA Function in Google Sheets | Return an Alternative Value Only for #N/A Errors

IFNA Function

The IFNA function returns a specified alternative value only when the formula in the first argument returns a #N/A error; otherwise, it returns the result of the formula as-is. Errors other than #N/A (such as #DIV/0! or #REF!) are still displayed as errors.

Syntax

=IFNA(value, value_if_na)
  • value: Specifies the formula or cell reference to evaluate for a #N/A error.
  • value_if_na: Specifies the value or formula to return if value evaluates to a #N/A error.

Practical Table Example

This example looks up a price from a product master and displays "Unregistered" if the product code is not found.

Cell A (Code) B (Price) C (Lookup Code) D (Formula) E (Display Result)
1 P01 1,000 P01 =IFNA(VLOOKUP(C1, $A$1:$B$2, 2, FALSE), "Unregistered") 1,000
2 P02 2,500 P03 =IFNA(VLOOKUP(C2, $A$1:$B$2, 2, FALSE), "Unregistered") Unregistered

Common Errors and Precautions

  • Errors other than #N/A are not converted: If the formula contains a #DIV/0! error such as =1/0, IFNA does not convert it and outputs #DIV/0! directly. This helps you catch formula bugs early.
  • Choosing with XLOOKUP: Because the newer XLOOKUP function has a built-in [missing_value] fourth argument, you do not need to wrap XLOOKUP in IFNA.

Frequently Asked Questions

Q. Should I use IFNA or IFERROR?

A. When using lookup functions such as VLOOKUP, XLOOKUP, or MATCH, IFNA is generally recommended because IFERROR hides range mistakes (#REF!) and function name typos (#NAME?) as well.

Q. What happens if you omit the second argument 'value_if_na'?

A. In Google Sheets' IFNA function, omitting the second argument returns a blank (empty) value when a #N/A error occurs.