Skip to content

NA

Returns the #N/A error on purpose. Use it to mark a value as not available, so charts skip the point and later formulas can detect the gap.

Syntax

=NA()

Information

Every version of Excel, including Microsoft 365, Excel 2024, 2021, 2019, 2016 and earlier, Excel for the web and the mobile apps.

Try it

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

A2
A
B
C
1
Result
2
#N/A
3
4

A2 =NA() returns #N/A

How NA works

NA takes no arguments and returns the #N/A error, which stands for "not available". =NA() looks like a strange thing to want, but #N/A has a particular role in Excel: it means a value is missing, rather than wrong, and a few features treat it differently from other errors.

Syntax

Always type the brackets: =NA(). Typing =NA without them makes Excel look for a name called NA, which returns #NAME?. NA has no arguments, so the brackets stay empty.

Why return an error on purpose

  • Charts. In a line or scatter chart, a point that is #N/A is not plotted, and a line chart connects the points on either side of it (or leaves a gap, depending on the chart settings). A blank cell, or the text "" returned by a formula, is plotted as zero or as a gap. A 0 pulls the line down to zero. So =IF(B2="", NA(), B2) is the standard way to keep missing months off a chart.
  • Marking missing inputs. In a model, a cell that must be filled in before results are valid can return NA(). Any formula that depends on it also returns #N/A, so nobody mistakes a half-finished model for a finished one.
  • Placeholders in lookups and tests. A check formula can return NA() when data fails a rule, which makes the failure visible in the totals.
  • Testing error handling. NA() is the quickest way to produce an error to test IFNA, ISNA or IFERROR.

Working around #N/A

An #N/A in a range stops most calculations. =SUM(C2:C9) returns #N/A if any cell in the range is #N/A. Several ways around it:

  • AGGREGATE with option 6 ignores errors: =AGGREGATE(9, 6, C2:C9) adds the numbers and skips the errors.
  • IFNA replaces the error with a value: =IFNA(C2, 0).
  • ISNA tests for it: =ISNA(C2).
  • Some functions, such as AVERAGEIF and SUMIF, skip errors in the range when the criteria exclude them, though that depends on the function.

NA() or a blank?

Use a blank cell when something genuinely hasn't happened and nothing needs to be plotted or protected. Use NA() when you need a visible, detectable "missing" value that flows through formulas, or an explicit instruction to a chart. Don't scatter NA() through a report that others will read, because errors alarm readers. Convert it with IFNA for the presentation layer.

Compared with typing #N/A

You can type #N/A into a cell, and Excel stores it as the error. =NA() is a formula, so it can sit inside IF logic. That makes it the better choice for anything that should change when the data changes.

Arguments

Examples

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

Example 1

The error itself

A2 =NA()

Result: #N/A

NA() returns #N/A. It takes no arguments, but the brackets are required.

A2
A
B
C
1
Result
2
#N/A
3
4

A2 =NA() returns #N/A

Example 2

Keep a missing month off a chart

C3 =IF(B3="",NA(),B3)

Result: #N/A

February has no figure. A plain =B3 would plot 0 and drag the line down. NA() makes the point unavailable, so the chart skips it.

C3
A
B
C
D
1
Month
Actual
For chart
2
Jan
410
3
Feb
#N/A
4
Mar
462
5

C3 =IF(B3="",NA(),B3) returns #N/A

Example 3

Sum a range that contains #N/A

C2 =AGGREGATE(9,6,A2:A5)

Result: 1370

SUM would return #N/A because of A3. AGGREGATE with function 9 (sum) and option 6 (ignore errors) adds 410, 462 and 498.

C2
A
B
C
D
1
For chart
Total
2
410
1370
3
#N/A
4
462
5
498
6
7
8

C2 =AGGREGATE(9,6,A2:A5) returns 1370

Example 4

Show a friendly value for the presentation layer

B2 =IFNA(A2,0)

Result: 0

The chart column keeps #N/A, while the report column turns it into 0 with IFNA. Both read the same source.

B2
A
B
C
D
1
For chart
For report
2
#N/A
0
3
4
5

B2 =IFNA(A2,0) returns 0

Your turn.

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

Task 1 of 2

In C2, return the actual figure from column B, or #N/A when the month has no figure, so a chart will skip it. Fill down to C7.

Answer in C2, then it fills down to C7.

C2
A
B
C
D
E
F
1
Month
Actual
For chart
Readings with a gap
2
Jan
410
12
3
Feb
#N/A
4
Mar
462
15
5
Apr
498
9
6
May
7
Jun
471
Total ignoring gaps
8
9
10
11

Common mistakes

  • Type the brackets: =NA(). Without them Excel treats NA as a name and returns #NAME?.
  • An #N/A in a range makes SUM, AVERAGE and most other functions return #N/A. Use AGGREGATE with option 6, or IFNA, to get around it.
  • Don't scatter NA() through a report. Errors alarm readers. Keep NA() in a chart-feeding column and show a cleaned column elsewhere.
  • Blank cells and "" are not the same as #N/A in a chart. A blank may plot as zero or leave a gap, depending on the chart setting, but #N/A is skipped.
  • IFERROR hides #N/A along with every other error. Use IFNA when you want to catch only the missing-value case.

Questions people ask

What does =NA() do in Excel?

It returns the #N/A error. Excel and its charts treat #N/A as "value not available", so it is used to mark missing data on purpose.

How do I stop a chart plotting zero for a missing value?

Have the chart read a helper column that returns NA() where the data is missing: `=IF(B2="", NA(), B2)`. Charts skip #N/A points instead of plotting zero.

How do I sum a range that contains #N/A?

Use `=AGGREGATE(9, 6, A2:A9)`. Function 9 is sum, and option 6 ignores errors. Or wrap each value in IFNA before adding.

Is NA() the same as typing #N/A into a cell?

The result is the same error. NA() is a formula, so it can sit inside IF and change when the data changes. A typed #N/A stays fixed.

Learn NA in a real sheet.

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