Statistical function

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)
ArgumentWhat it means
rangeRequiredThe 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

F2fx=COUNTBLANK(B2:D5)
ABCDEF
1EmployeeMonTueWed
2Rosa87.54
3Hugo88
4Ines888
5Jon6

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

D2fx=COUNTBLANK(B2:B6)
ABCD
1ProductUnits sold
2Mugs252
3Caps0
4Bags
5Pens0
6Shirts

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

D2fx=1-COUNTBLANK(B2:B6)/ROWS(B2:B6)
ABCD
1FieldValue
2NameRuth Adler60%
3Email[email protected]
4Phone
5Address12 Mill Lane
6Postcode

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%.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE! or too many argumentsMore 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.

LanguageFunction name
DanishANTAL.BLANKE
DutchAANTAL.LEGE.CELLEN
FinnishLASKE.TYHJÄT
FrenchNB.VIDE
GermanANZAHLLEEREZELLEN
HungarianDARABÜRES
ItalianCONTA.VUOTE
Norwegian (Bokmål)TELLBLANKE
PolishLICZ.PUSTE
Portuguese (Brazil)CONTAR.VAZIO
Portuguese (Portugal)CONTAR.VAZIO
RussianСЧИТАТЬПУСТОТЫ
SpanishCONTAR.BLANCO
SwedishANTAL.TOMMA
TurkishBOŞLUKSAY