The Excel COUNTBLANK function counts the empty cells in a range — including cells holding a formula that returns an empty string. It's the quick way to find gaps in your data.
Syntax
| Argument | Description | |
|---|---|---|
range | Required | The single range in which to count empty cells. |
How to use it
COUNTBLANK reports how many cells in a range are empty. A formula that returns "" is treated as blank here (the opposite of COUNTA), which makes COUNTBLANK useful for spotting missing entries.
If A2:A20 has 19 cells and 5 are empty, the formula returns 5. A cell containing a zero or a space is not blank — only genuinely empty cells (and ""-returning formulas) count.
Counterpart to COUNTA: in any range, COUNTA(range) + COUNTBLANK(range) roughly equals the total cell count — though formulas returning "" are counted by both, so the two can overlap.
Try it: interactive demo
Pick a COUNTBLANK example to see the formula and its result.
Practice workbook
Frequently asked questions
Does COUNTBLANK count cells with a space or zero?
"") are counted.Does COUNTBLANK count a formula that returns ""?
Can COUNTBLANK take multiple ranges?
How is COUNTBLANK different from COUNTA?
COUNTA counts non-empty cells, while COUNTBLANK counts empty ones. (Formulas returning "" are the tricky case — COUNTA counts them, and so does COUNTBLANK.)Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class