How to use the IFNA function
What is the IFNA function?
The IFNA function handles #N/A errors only, it returns a value you specify if the formula returns a #N/A error.
What is the #N/A error value?
The #N/A error occurs when a value is not available for a formula or found in a given cell range, for example in the VLOOKUP or MATCH functions.
The NA function lets you return the #N/A error in any formula you like, you can for instance use the IF function and a logical expression to determine when the error should occur.
Related #N/A functions
Excel Function | Description |
---|---|
NA() | Returns the #N/A error value |
IFNA(value, value_if_na) | Returns value_if_na if value is #N/A, otherwise returns value |
ISNA(value) | Returns TRUE if value is #N/A, FALSE otherwise |
ISERR(value) | Returns TRUE if value is any error except #N/A, otherwise FALSE |
ISERROR(value) | Returns TRUE if value is any error value, FALSE otherwise |
IFERROR(value, value_if_error) | Returns value_if_error if value is any error, otherwise returns value |
Table of Contents
1. IFNA Function Syntax
IFNA(value, value_if_na)
2. IFNA Function Arguments
value | Required. The value you want to check. |
value_if_na | Required. The value to return if the value argument returns #N/A. |
3. IFNA Function Example
The image above shows values and formulas in column B, the first cell B3 contains value A. The IFNA Function returns "A" because the result is not an #N/A error.
Formula in cell D3:
#N/A means not available and is returned if a formula or function can't find a value. Cell B5 contains this formula:
It returns a #N/A error because 1 is not found in the second argument in the MATCH function. The IFNA function catches this error and returns "Yes" which is the value we specified in the second argument.
4. When to use the IFNA Function?
Use the IFNA function instead of the IFERROR function to check for #N/A errors specifically. For example, VLOOKUP returns #N/A when it can't find the lookup value.
The IFERROR function checks for all error values which in most cases is not recommended. This makes it harder to spot a more serious error since all error values are handled.
'IFNA' function examples
The picture above shows an array formula in cell B9:C13 that extracts unique distinct records from two tables in cell […]
This article demonstrates ways to extract names and corresponding populated date ranges from a schedule using Excel 365 and earlier […]
Excel 2010 has a PowerPivot feature and DAX formulas that let you work with multiple tables of data. You can […]
Functions in 'Logical' category
The IFNA function function is one of many functions in the 'Logical' category.
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Contact Oscar
You can contact me through this contact form