The Excel ISNA function returns TRUE when a cell contains the #N/A error and FALSE for any other value, or any other error type. You can use the ISNA function with the IF function test for an error and display a friendly message when it appears.
Syntax:= ISNA (value)
The ISNA function syntax has the following arguments:
- Value (required argument) – This is the expression or value that needs to be tested. It is generally provided as a cell address.
Example: Let’s look at some Excel ISNA function examples and explore how to use the ISNA function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following ISNA examples would return:
Suppose we are given the data below:
When we did a VLOOKUP for the given list of fruits, we got the list below:
Now instead of the #N/A error, we want a customized message that says “Not found”
The formula to use will be:
Syntax: =IF(ISNA(VLOOKUP(D6,A2:B7,2,0)),”Not found”,VLOOKUP(D6,A2:B7,2,0))
Result: Not found
Syntax: =IF(ISNA(VLOOKUP(D7,A2:B7,2,0)),”Not found”,VLOOKUP(D7,A2:B7,2,0))
Syntax: =IF(ISNA(VLOOKUP(D8,A2:B7,2,0)),”Not found”,VLOOKUP(D8,A2:B7,2,0))
We need to drag the formula for the entire list for which we need to find out the cost. Using the IF-ISNA formula combination is easy. All we need to do is to wrap the ISNA formula inside an IF logic condition. Remember, the crucial thing here while using the IF-ISNA formula combination is that we need to put in the original formula twice.
- The ISNA function is part of the IS functions that are often used to test the results of formulas in a cell for errors.
- If we are using MS Excel 2013-2016, the function is very useful for identifying and handling #N/A! errors.