The Excel IFNA function tests if an initial supplied value (or expression) evaluates to the Excel #N/A error. If so, the function returns a second supplied value; Otherwise the function returns the first supplied value.
The syntax of the function is:
Where the arguments are as follows:
value | - | The value or expression to be tested. |
value_if_na | - | The alternative value or expression, that is to be returned if the first supplied value evaluates to the #N/A error. |
Note: the IFNA function is new to Excel 2013, so is not available in earlier versions of Excel.
The following spreadsheet shows two simple examples of the Excel IFNA function:
Formulas:
|
Results:
|
In cells D1 and D2 of the following spreadsheet, the Excel IFNA function is used to check the result of the Excel Vlookup Function.
Formulas:
|
|||||||||||||||||||||||||||||||||||
Results:
|
For further information and examples of the Excel IFNA function, see the Microsoft Office website.