ISNA (Value) ISNA (Value)

Value

The value to check.

Returns

Logical Logical

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:

ISNA ( XLOOKUP (10, { 20, 30 }, { 200, 300 }))
ISNA ( XLOOKUP (10; { 20; 30 }; { 200; 300 }))

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:

IFNA ( XLOOKUP (10, { 20, 30 }, { 200, 300 }), 500)
IFNA ( XLOOKUP (10; { 20; 30 }; { 200; 300 }); 500)

ISERR is the opposite of ISNA, meaning that it detects all errors except for #N/A errors. Consider this formula:

ISERR ( XLOOKUP (Value1 / Value2, { 20, 30 }, { 200, 300 }))
ISERR ( XLOOKUP (Value1 / Value2; { 20; 30 }; { 200; 300 }))

The formula above returns TRUE if Value2 is 0 or blank, resulting in a #DIV/0! error ("division by zero"), but it returns FALSE if the value resulting from the Value1 / Value2Value1 / Value2 cannot be found in the lookup array.

ISNA and arrays

Applying ISNA to an array yields a logical array with the same size as the original array, where TRUE elements indicate that the corresponding element in the original array is an #N/A error and FALSE elements indicate the opposite.

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):

ISNA ({  NA (), 4 / Value2 })
ISNA ({  NA (); 4 / Value2 })

(The formula above requires that Value2 is 0 or blank.)

Examples

ISNA ( NA ())
ISNA ( NA ())

Returns TRUE, as the NA function returns an #N/A error.

ISNA ( XLOOKUP (10, { 20, 30 }, { 200, 300 }))
ISNA ( XLOOKUP (10; { 20; 30 }; { 200; 300 }))

Returns TRUE, because the sought value, 10, is not part of the { 20, 30 }{ 20; 30 } lookup array given to XLOOKUP.

IFNA ( XLOOKUP (10, { 20, 30 }, { 200, 300 }), 500)
IFNA ( XLOOKUP (10; { 20; 30 }; { 200; 300 }); 500)

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.

ISNA ({ 4 / Value2, NA () })
ISNA ({ 4 / Value2; NA () })

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. ( Value2 must be 0 or blank in order for the first array element to be a #DIV/0! error.)

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell