Function · Statistical

Excel COUNTBLANK function

The Excel COUNTBLANK function counts empty cells. Two cells in the six-cell hours log are empty, so it returns 2. A zero is not empty.

All current Excel versions. Also in Excel for the web and Google Sheets.

Syntax =COUNTBLANK(range)

COUNTBLANK
=COUNTBLANK(B2:B7)

Arguments

NameRequiredWhat to pass
rangeRequiredOne contiguous range. COUNTBLANK does not take a list of separate ranges the way COUNT does.

Examples

Missing entries in the hours log

=COUNTBLANK(B2:B7)

Result 2

=COUNTBLANK(B2:B7)B8
Hours log
AB
1#Entry
21Maya
328
43
54Jordan
65
766
8Blanks2
A picture of the sheet, not a live calculator. Zeros are values. Only empty cells, and formulas that return empty text, are counted.

COUNTBLANK counts empty cells in one range. The hours log has six cells and two holes, so the result is 2. A zero is not a hole. Someone who worked zero hours and typed 0 is present in the log. Someone who has not typed anything is the cell this function is for.

A formula that returns "" looks empty and is counted. That is the awkward overlap with COUNTA, which also counts that formula. A cell with a space is not counted. The space is a character, so the cell is not blank, and COUNTA will include it.

The argument has to be one block of cells. COUNT and COUNTA will accept B2:B7 and D2:D7 as two arguments. COUNTBLANK will not.