COUNTBLANK function
Counts the empty cells in a range, including cells whose formula returns empty text (""). Zeros are not blank.
Available in All versions of Excel, Excel for the web, Excel for Mac
In every Excel versionWorks in Google Sheets
Syntax
COUNTBLANK(range)| Argument | What it means | |
|---|---|---|
range | Required | The single range in which to count empty cells. Unlike COUNT and COUNTA, only one range is allowed. |
Returns: A whole number: how many cells in the range are empty or contain empty text.
How COUNTBLANK works
COUNTBLANK counts the gaps. It is ideal for checking how complete a dataset is: how many employees have not submitted their hours, how many survey questions were skipped, how many products have no price yet. Point it at one range and it tells you how many cells are empty.
Two details matter. First, a cell holding 0 is not blank, even if a number format hides the zero. Second, a cell containing a formula that returns "" is treated as blank, even though COUNTA counts the same cell as filled. COUNTBLANK accepts only one range; to check several areas, add several COUNTBLANK results together.
Examples
1Missing timesheet entries
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Employee | Mon | Tue | Wed | ||
| 2 | Rosa | 8 | 7.5 | 4 | ||
| 3 | Hugo | 8 | 8 | |||
| 4 | Ines | 8 | 8 | 8 | ||
| 5 | Jon | 6 |
Result: 4
The 4 × 3 block has 12 cells. Four of them are empty (Rosa Wednesday, Hugo Monday, Jon Monday and Tuesday), so 4 entries still need chasing.
2A zero is not a blank
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Product | Units sold | ||
| 2 | Mugs | 25 | 2 | |
| 3 | Caps | 0 | ||
| 4 | Bags | |||
| 5 | Pens | 0 | ||
| 6 | Shirts |
Result: 2
Caps and Pens show 0, which is a real value meaning "nothing sold". Only Bags and Shirts are truly empty, so the answer is 2. This lets you separate "no sales" from "no data yet".
3Percentage of a form completed
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Field | Value | ||
| 2 | Name | Ruth Adler | 60% | |
| 3 | [email protected] | |||
| 4 | Phone | |||
| 5 | Address | 12 Mill Lane | ||
| 6 | Postcode |
Result: 60%
Two of the five fields are blank, so 2/5 = 0.4 of the form is missing and 1 − 0.4 = 0.6 is complete. Formatted as a percentage the cell shows 60%.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! or too many arguments | More than one range was given, e.g. =COUNTBLANK(B2:B6, D2:D6). | Add separate results: =COUNTBLANK(B2:B6)+COUNTBLANK(D2:D6). |
Tips
- A cell containing only a space is not blank for COUNTBLANK. Use
=SUMPRODUCT(--(TRIM(B2:B6)=""))to treat spaces as empty. =COUNTIF(B2:B6, "")gives the same answer as COUNTBLANK and can be combined with other conditions in COUNTIFS.
Questions
Why does COUNTBLANK count a cell that has a formula in it?
If the formula returns empty text (""), COUNTBLANK treats the cell as blank. ISBLANK on the same cell returns FALSE, because the cell is not truly empty.
How do I count blank rows in one column only when another column is filled?
Use COUNTIFS: =COUNTIFS(A2:A10, "<>", B2:B10, "") counts rows where A has a value but B is empty.
Google Sheets
COUNTBLANK also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
COUNTBLANK in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | ANTAL.BLANKE |
| Dutch | AANTAL.LEGE.CELLEN |
| Finnish | LASKE.TYHJÄT |
| French | NB.VIDE |
| German | ANZAHLLEEREZELLEN |
| Hungarian | DARABÜRES |
| Italian | CONTA.VUOTE |
| Norwegian (Bokmål) | TELLBLANKE |
| Polish | LICZ.PUSTE |
| Portuguese (Brazil) | CONTAR.VAZIO |
| Portuguese (Portugal) | CONTAR.VAZIO |
| Russian | СЧИТАТЬПУСТОТЫ |
| Spanish | CONTAR.BLANCO |
| Swedish | ANTAL.TOMMA |
| Turkish | BOŞLUKSAY |