Skip to content

COUNTBLANK

Counts the empty cells in a range, including cells where a formula returns empty text.

Syntax

=COUNTBLANK()

Statistical

All versions of Excel, including Excel for Microsoft 365 and Excel for the web.

Try it

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

B11
A
B
C
1
Respondent
Satisfaction (1-5)
2
R01
4
3
R02
4
R03
5
5
R04
3
6
R05
7
R06
4
8
R07
2
9
R08
10
11
Missing answers
3

B11 =COUNTBLANK(B2:B9) returns 3

How COUNTBLANK works

COUNTBLANK counts the cells in a range that show nothing. It is the quickest way to answer "how many answers are missing?" or "how many invoices have no payment date?".

What counts as blank

COUNTBLANK counts two kinds of cell:

  • Truly empty cells, where nothing has been typed.
  • Cells with a formula that returns empty text (""). They look empty, so COUNTBLANK treats them as blank.

It does not count:

  • cells containing the number 0, even when a number format hides the zero;
  • cells containing a space, which looks blank but is text;
  • cells with an error value.

If the range includes cells that hold a single space, COUNTBLANK will undercount them. Clean the data with TRIM first, or check for them separately.

One range only

COUNTBLANK takes a single range argument. To count blanks in two separate areas, add two formulas: =COUNTBLANK(B2:B9)+COUNTBLANK(D2:D9).

Measuring completeness

A common use is the share of a column that is missing. Divide by the size of the range:

=COUNTBLANK(B2:B9)/ROWS(B2:B9)

Format the result as a percentage. This is a useful data-quality check on a survey, a register or an import before you build a report on it.

COUNTBLANK, COUNTA and COUNT

For a range with no formulas returning "", COUNTA plus COUNTBLANK equals the number of cells. When a column is built from IF formulas that return "", the two overlap, because COUNTA counts a formula result and COUNTBLANK counts empty text.

Blank rows with conditions

COUNTBLANK has no conditions. To count blanks that depend on another column, use COUNTIFS with "" as the criteria: =COUNTIFS(A2:A9,"East",B2:B9,"") counts East rows with no value in column B.

Arguments

range
The cells to check, such as B2:B9. It takes one range only, not a list of separate cells.

Examples

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

Example 1

Count missing survey answers

B11 =COUNTBLANK(B2:B9)

Result: 3

R02, R05 and R08 left the question empty.

B11
A
B
C
1
Respondent
Satisfaction (1-5)
2
R01
4
3
R02
4
R03
5
5
R04
3
6
R05
7
R06
4
8
R07
2
9
R08
10
11
Missing answers
3

B11 =COUNTBLANK(B2:B9) returns 3

Example 2

Cells that show nothing count as blank

B8 =COUNTBLANK(B2:B6)

Result: 2

The two scores below 4 return empty text. Those cells look empty and COUNTBLANK counts them, even though they hold formulas.

B8
A
B
C
1
Score
Promoter?
2
4
Promoter
3
3
4
5
Promoter
5
3
6
4
Promoter
7
8
Not promoters
2

B8 =COUNTBLANK(B2:B6) returns 2

Example 3

Share of a column that is missing

B11 =COUNTBLANK(B2:B9)/ROWS(B2:B9)

Result: 37.5%

Three blanks out of eight rows is 37.5%.

B11
A
B
C
1
Respondent
Satisfaction (1-5)
2
R01
4
3
R02
4
R03
5
5
R04
3
6
R05
7
R06
4
8
R07
2
9
R08
10
11
Share missing
37.5%

B11 =COUNTBLANK(B2:B9)/ROWS(B2:B9) returns 37.5%

Example 4

Zeros and spaces are not blank

B8 =COUNTBLANK(B2:B6)

Result: 1

Only the Bubble wrap cell is truly empty. The 0 is a number, and the space in B4 is text.

B8
A
B
C
1
Item
Stock
2
Gloves
5
3
Tape
0
4
Labels
5
Bubble wrap
6
Pallet wrap
3
7
8
Blank cells
1
9

B8 =COUNTBLANK(B2:B6) returns 1

Your turn.

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

Task 1 of 2

In E2, count the invoices with no payment date.

Answer in E2.

E2
A
B
C
D
E
1
Invoice
Paid on
Measure
Result
2
INV-1001
12-Feb-2025
Unpaid invoices
3
INV-1002
Share unpaid
4
INV-1003
17-Feb-2025
5
INV-1004
6
INV-1005
7
INV-1006
24-Feb-2025
8
INV-1007
04-Mar-2025
9
INV-1008
10
INV-1009
09-Mar-2025
11
INV-1010
14-Mar-2025
12

Common mistakes

  • A cell containing a single space, or text copied in from another system, looks blank but is not counted. Use TRIM to clean the data, or count with COUNTIF(range,"") after cleaning.
  • A zero is not blank, even if a custom number format hides it. COUNTBLANK will not count it.
  • COUNTBLANK counts cells where a formula returns "". If you want only the cells that are really empty, compare with ROWS(range)-COUNTA(range), which counts only cells with nothing in them.
  • COUNTBLANK accepts a single range. Excel rejects a list of separate cells such as COUNTBLANK(A1,B1) as too many arguments; add several COUNTBLANK results instead.

Questions people ask

Does COUNTBLANK count cells with zero?

No. Zero is a number, so the cell is not blank, even if a number format makes it look empty.

Why does COUNTBLANK count a formula cell?

A formula that returns empty text (`""`) shows nothing, and COUNTBLANK treats it as blank. A formula returning anything else, such as 0, is not counted.

How do I count blank cells that meet a condition?

Use COUNTIFS with `""` as criteria: `=COUNTIFS(A2:A9,"East",B2:B9,"")` counts rows where A is East and B is empty.

How do I count non-blank cells?

Use COUNTA for any non-empty cell, COUNT for numbers only, or `=COUNTIF(B2:B9,"<>")`.

Learn COUNTBLANK in a real sheet.

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