IFNA function

This article describes the formula syntax and usage of the IFNA function in Microsoft Excel.

Description

Returns the value you specify if the formula returns the #N/A error value; otherwise returns the result of the formula.

Syntax

IFNA(value, value_if_na)

The IFNA function syntax has the following arguments.

  • Value    Required. The argument that is checked for the #N/A error value.

  • Value_if_na    Required. The value to return if the formula evaluates to the #N/A error value.

Remarks

  • If Value or Value_if_na is an empty cell, IFNA treats it as an empty string value ("").

  • If Value is an array formula, IFNA returns an array of results for each cell in the range specified in value.

Example

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Formula

Description

Result

=IFNA(VLOOKUP("Seattle",$A$5:$B$10,0),"Not found")

IFNA tests the result of the VLOOKUP function. Because Seattle is not found in the lookup range, VLOOKUP returns the #N/A error value. IFNA returns the string "Not found" in the cell instead of the standard #N/A error value.

Not found

Region ID

City

Atlanta

105

Portland

142

Chicago

175

Los Angeles

251

Boise

266

Cleveland

275

Top of Page

Applies To: Excel 2016 Preview, Excel 2013, Excel Online, Excel 2016 for Mac, Excel for Mac 2011



Was this information helpful?

Yes No

How can we improve it?

255 characters remaining

To protect your privacy, please do not include contact information in your feedback. Review our privacy policy.

Thank you for your feedback!

Support resources

Change language