Skip to content

ISNA

Returns TRUE if a value is the #N/A error, and FALSE for anything else, including other errors.

Syntax

=ISNA()

Information

All versions of Excel.

Try it

Edit the formula in B2 or change the inputs. The sheet recalculates as you type.

B2
A
B
C
1
Value
Is #N/A?
2
#N/A
TRUE
3

B2 =ISNA(A2) returns TRUE

How ISNA works

ISNA tests whether a value is the #N/A error ("value not available"). It returns TRUE for #N/A and FALSE for everything else: numbers, text, blanks, and every other error such as #DIV/0! or #VALUE!. That narrow focus is the point. #N/A is what a lookup returns when it finds nothing, so ISNA lets you react to "not found" without hiding genuine mistakes.

The one argument

value can be a cell, a formula or a constant. =ISNA(A2) tests the cell. =ISNA(MATCH("X",A2:A10,0)) tests whether MATCH failed to find X. =ISNA(NA()) is TRUE, because NA returns the error on purpose.

Where #N/A comes from

  • A lookup that finds no match: VLOOKUP, HLOOKUP, MATCH and XMATCH return #N/A (XLOOKUP too, unless you supply an if_not_found value).
  • A cell that holds =NA(), used to mark a gap that a chart should skip.
  • Some array and statistics functions when no result exists.

Common patterns

  • Flag missing records: =ISNA(MATCH(A2,Master!A:A,0)) is TRUE for codes that are not in the master list.
  • Count missing records: =SUMPRODUCT(--ISNA(MATCH(A2:A100,F2:F500,0))).
  • Custom message: =IF(ISNA(VLOOKUP(A2,F2:G20,2,FALSE)),"Not in list",VLOOKUP(A2,F2:G20,2,FALSE)).
  • Count #N/A cells in a column: =SUMPRODUCT(--ISNA(B2:B100)).

ISNA, IFNA, ISERROR and IFERROR

ISNA answers "is it #N/A?" with TRUE or FALSE. IFNA goes one step further: it returns a replacement value when the result is #N/A, so it is usually shorter than IF with ISNA. ISERROR is TRUE for every error type, and IFERROR replaces all of them. Prefer the NA versions for lookups. A #REF! from a deleted column should stay visible, not turn into "Not found".

Blank cells

A blank cell is not an error, so ISNA returns FALSE. A lookup of a blank cell can still return #N/A, so test the result of the lookup rather than the input.

Arrays

In Microsoft 365, ISNA works on ranges and arrays and returns an array of TRUE and FALSE values: =ISNA(B2:B10) spills nine results.

Arguments

value
The value, cell reference or formula result to test. ISNA is TRUE only when it is the #N/A error.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Test a cell that holds #N/A

B2 =ISNA(A2)

Result: TRUE

NA() returns the #N/A error on purpose, so ISNA is TRUE.

B2
A
B
C
1
Value
Is #N/A?
2
#N/A
TRUE
3

B2 =ISNA(A2) returns TRUE

Example 2

Other errors are not #N/A

B2 =ISNA(A2)

Result: FALSE

#DIV/0! is a different error, so ISNA returns FALSE. Use ISERROR to catch every error type.

B2
A
B
C
1
Value
Is #N/A?
2
#DIV/0!
FALSE
3

B2 =ISNA(A2) returns FALSE

Example 3

Check whether a code is missing from a list

D2 =ISNA(MATCH(C2,A2:A4,0))

Result: TRUE

MATCH returns #N/A when it finds nothing, and ISNA turns that into TRUE.

D2
A
B
C
D
1
Master list
Code
Missing?
2
AB-10
AB-25
TRUE
3
AB-20
4
AB-30
5

D2 =ISNA(MATCH(C2,A2:A4,0)) returns TRUE

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In D2, return TRUE if the order SKU in C2 is not in the master list in A2:A5, and FALSE if it is. Fill it down to D4.

Answer in D2, then it fills down to D4.

D2
A
B
C
D
E
1
Master SKU
Order SKU
Not in master?
Missing count
2
FX-1010
FX-1085
3
FX-1022
FX-1090
4
FX-1047
FX-1022
5
FX-1085
6
7
8

Common mistakes

  • ISNA is TRUE only for #N/A. #VALUE!, #REF!, #DIV/0! and the other errors all return FALSE.
  • ISNA tests a value that already exists. To react to a failed lookup, put the lookup inside ISNA, not just its input cell.
  • Hiding every error with IFERROR can bury real problems. Use ISNA or IFNA when only "not found" is expected.
  • A blank cell is not #N/A, so =ISNA(A2) is FALSE for an empty A2.

Questions people ask

What does ISNA do in Excel?

It returns TRUE when the value is the `#N/A` error and FALSE otherwise.

What is the difference between ISNA and ISERROR?

ISNA is TRUE only for `#N/A`. ISERROR is TRUE for every error, including `#DIV/0!`, `#VALUE!` and `#REF!`.

Should I use ISNA or IFNA?

IFNA is shorter when you want to replace the error with a value. Use ISNA when you want a TRUE or FALSE flag.

How do I count #N/A errors in a range?

Use `=SUMPRODUCT(--ISNA(B2:B100))`.

Learn ISNA in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.