ISNA function
Value
The value to check.
Returns
Whether the given value is an #N/A
error ("not
available").
Returns whether the given value is an #N/A
error ("not
available"). As the NA
function returns an #N/A
error, ISNA(NA())ISNA(NA()) returns TRUE.
Lookup functions like XLOOKUP return #N/A
errors
when a value cannot be found. The ISNA function may be used to detect the
#N/A
error specifically.
This formula returns TRUE, because the sought value, 10, is not part of the { 20, 30 }{ 20; 30 } lookup array given to XLOOKUP:
The IFNA function is
used to return a specific value if a value is an #N/A
error, or
the value itself otherwise. This formula returns 500, because the sought
value, 10, is not part of the { 20, 30 }{ 20; 30 } lookup array given
to XLOOKUP:
ISERR is the
opposite of ISNA, meaning that it detects all errors except for
#N/A
errors. Consider this formula:
The formula above returns TRUE if the value of Field2 is 0 or blank,
resulting in a #DIV/0!
error ("division by zero"), but it
returns FALSE if the value resulting from the Field1 / Field2Field1 / Field2 cannot be found in the
lookup array.
ISNA and arrays
Applying ISNA to an array only yields a single value, related to the array value itself and not its constituent elements.
This formula returns FALSE, as the array as a whole is not an error, even if
its first element is an #N/A
error and its second element is a
#DIV/0!
error:
(The formula above requires that the value of Field2 is 0 or blank.)
Use MAP to invoke ISNA once for every array element and have the results returned as a logical array.
This formula returns { TRUE,
FALSE }{ TRUE;
FALSE }, indicating that the first array element is an
#N/A
error and the second array element is not (it is a
#DIV/0!
error):
Examples
Returns TRUE, because the sought value, 10, is not part of the { 20, 30 }{ 20; 30 } lookup array given to XLOOKUP.
Returns 500, because the sought value, 10, is not part of the
{ 20,
30 }{ 20;
30 } lookup array given to XLOOKUP. The IFNA function is used to return a
specific value if a value is an #N/A
error, or the value
itself otherwise.
Returns { FALSE,
TRUE }{ FALSE;
TRUE }, indicating that the first array element is not an
#N/A
error (it is a #DIV/0!
error) and the
second array element is an #N/A
error. (The value of
Field2 must be 0 or blank in order for the first array element
to be a #DIV/0!
error.)