Example 1
Count missing survey answers
B11 =COUNTBLANK(B2:B9)
Result: 3
R02, R05 and R08 left the question empty.
B11 =COUNTBLANK(B2:B9) returns 3
Counts the empty cells in a range, including cells where a formula returns empty text.
Syntax
=COUNTBLANK()
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 =COUNTBLANK(B2:B9) returns 3
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?".
COUNTBLANK counts two kinds of cell:
""). They look empty, so COUNTBLANK treats them as blank.It does not count:
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.
COUNTBLANK takes a single range argument. To count blanks in two separate areas, add two formulas: =COUNTBLANK(B2:B9)+COUNTBLANK(D2:D9).
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.
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.
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.
B2:B9. It takes one range only, not a list of separate cells.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
B11 =COUNTBLANK(B2:B9)
Result: 3
R02, R05 and R08 left the question empty.
B11 =COUNTBLANK(B2:B9) returns 3
Example 2
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 =COUNTBLANK(B2:B6) returns 2
Example 3
B11 =COUNTBLANK(B2:B9)/ROWS(B2:B9)
Result: 37.5%
Three blanks out of eight rows is 37.5%.
B11 =COUNTBLANK(B2:B9)/ROWS(B2:B9) returns 37.5%
Example 4
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 =COUNTBLANK(B2:B6) returns 1
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.
COUNTIF(range,"") after cleaning."". 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(A1,B1) as too many arguments; add several COUNTBLANK results instead.No. Zero is a number, so the cell is not blank, even if a number format makes it look empty.
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.
Use COUNTIFS with `""` as criteria: `=COUNTIFS(A2:A9,"East",B2:B9,"")` counts rows where A is East and B is empty.
Use COUNTA for any non-empty cell, COUNT for numbers only, or `=COUNTIF(B2:B9,"<>")`.
Tracks take you from the basics to modelling, one graded exercise at a time.