What is the ISNA function?
=ISNA(value)ISNA returns TRUE only for the #N/A error. #N/A usually comes from VLOOKUP or MATCH when the lookup value is not found.
Other errors (#DIV/0!, #VALUE! and so on) return FALSE, so you can tell "not found" apart from "calculation went wrong".
Arguments
- value
- The value, cell or formula to test.
ISNA examples
Example 1. Show lookup failures
=IF(ISNA(MATCH(A2, list, 0)), "Missing", "Found")Checks whether A2 is in the list.
Example 2. Replace only #N/A
=IF(ISNA(VLOOKUP(A2, table, 2, FALSE)), "Not registered", VLOOKUP(A2, table, 2, FALSE))The approach used before IFNA existed.
Example 3. Count them
=SUMPRODUCT(--ISNA(B2:B100))Counts the #N/A cells.
Common mistakes
Mixing it up with ISERROR
ISERROR is TRUE for every error. Use ISNA to pick out #N/A only.
The text "#N/A"
Typing #N/A as text is not the same as the real error value.
FAQ
- A shorter way?
- IFNA(formula, value_if_na) combines IF and ISNA.
- Is it the opposite of ISERR?
- ISERR is TRUE for errors except #N/A, so on error values it gives the opposite result to ISNA.