ISNA Function¶
The ISNA function in Excel is used to check whether a value is the #N/A error specifically. It returns TRUE when the value is #N/A, and FALSE for all other error types and all non-error values. ISNA is the natural companion to lookup functions like VLOOKUP, XLOOKUP, and MATCH, which use #N/A to signal "not found" — letting you distinguish a missing match from a genuine formula error.
Key Features of ISNA:¶
- Returns
TRUEonly when the value is the#N/Aerror. - Returns
FALSEfor all other error types (#VALUE!,#REF!,#DIV/0!,#NUM!,#NAME?,#NULL!). - Returns
FALSEfor all non-error values — numbers, text, logicals, dates, and blanks. - Pairs naturally with lookup functions (
VLOOKUP,XLOOKUP,MATCH,INDEX/MATCH) to detect failed matches. - Complements
ISERR, which returns TRUE for all errors except#N/A.
Syntax:¶
- value: The value or expression you want to test for the
#N/Aerror. Typically a cell reference or formula result.
How ISNA Works:¶
ISNAevaluates the provided value or expression.- If the result is the
#N/Aerror, it returnsTRUE. - If the result is any other error (
#VALUE!,#REF!,#DIV/0!,#NUM!,#NAME?,#NULL!), it returnsFALSE. - If the result is any non-error value, it returns
FALSE.
Examples:¶
1. Direct #N/A:¶
Result:
2. Other Errors Are Not Detected:¶
If A1 contains #DIV/0!:
Result:
3. Valid Number:¶
If A1 contains 100:
Result:
4. Failed VLOOKUP:¶
If "Unknown" is not present in the lookup range:
Result:
5. Custom Message for Missing Lookups:¶
Result:
6. Counting #N/A Cells in a Range:¶
Result:
7. Separating #N/A from Other Errors:¶
Result:
8. Pairing with MATCH:¶
Result:
Notes:¶
ISNAis the narrowest of the error-detection functions: it matches one specific error, not the whole family.- In modern Excel,
IFNAis usually preferred overIF(ISNA(...), ...)for handling lookup failures — it's shorter and evaluates the lookup only once. ISNAreturnsFALSEfor#DIV/0!,#VALUE!, and other errors. UseISERRORif you want to catch every error type, orISERRto catch every error except#N/A.ISNAis part of the IS family of information functions (ISBLANK,ISERR,ISERROR,ISNA,ISNUMBER,ISTEXT,ISLOGICAL, etc.).- When applied to an array or range,
ISNAevaluates each element and returns a corresponding array of TRUE/FALSE values.
Applications:¶
- Lookup Failure Handling: Detect when
VLOOKUP,XLOOKUP,MATCH, orHLOOKUPreturned no match, so you can substitute a meaningful default. - Data Quality Checks: Find cells deliberately marked with
=NA()to indicate intentionally missing data. - Conditional Formatting: Highlight cells with
#N/Aseparately from cells with formula errors. - Layered Error Logic: Combine with
ISERRto branch on "not found" vs. "formula broke" cases. - Lookup Diagnostics: Count or report missing keys in a lookup column when reconciling datasets.
Related Functions:¶
- ISERROR: Returns TRUE for any error, including
#N/A. - ISERR: Returns TRUE for any error except
#N/A— the complement ofISNA. - ERROR.TYPE: Returns a numeric code identifying which specific error a value is (1=
#NULL!, …, 7=#N/A). - NA: Returns the
#N/Aerror explicitly. - IFNA: Shorthand for
IF(ISNA(x), fallback, x). - IFERROR: Returns a fallback value if a formula evaluates to any error.
- TYPE: Returns a numeric code indicating the broad data type of a value (16 for any error).
Tip: When working with lookups, prefer
IFNA(VLOOKUP(...), "Not found")overIF(ISNA(VLOOKUP(...)), "Not found", VLOOKUP(...))— it's shorter, evaluates the lookup once, and makes intent clearer. ReserveISNAfor situations where you need the TRUE/FALSE result itself (e.g., counting missing matches withSUMPRODUCT, or branching on whether a key was found before doing further work).