In Excel: use =COUNTBLANK(range) — it counts empty cells, and also counts cells whose formula returns an empty string.
Syntax
Arguments
| Argument | Description | |
|---|---|---|
range | required | The range to check for empty cells. |
Related functions
Operators >, >=, <, <=, <> and the * / ? wildcards all work, exactly as in Excel. Matching is case-insensitive.
- Not blank (COUNTA)
- 6
- Numbers (COUNT)
- 3
- Text cells
- 3
- Blank (COUNTBLANK)
- 2
8 cells read
COUNT only counts numbers; COUNTA counts anything that is not blank. A number stored as text is text to both.
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
COUNTBLANK counts the empty cells in a range. Its defining quirk is the mirror image of COUNTA's: a formula returning "" is counted as blank here, even though the cell is not truly empty. That makes the two functions disagree about the same range, which is confusing until you know it — and useful once you do, because the difference between them isolates exactly the cells that only look empty. Its everyday role is completeness checking: how many required fields are still unfilled. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. Treat “countblank function in excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected blanks shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.
A worked example
A required-field column C2:C200: =COUNTBLANK(C2:C200) returns how many entries are still missing, and =COUNTBLANK(C2:C200)/ROWS(C2:C200) turns that into a completeness percentage. On a range of =IF(...,"",...) formulas, COUNTBLANK counts the empty-string results while COUNTA does not — the gap identifies them precisely. COUNTBLANK is the completeness check for any data-entry sheet, and its disagreement with COUNTA is a precise diagnostic rather than a bug. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.
In Google Sheets
Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. If you take one thing from this page on “countblank function in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.
Common mistakes
- Expecting it to ignore formula-produced empty strings — it counts them as blank.
- Passing several ranges;
COUNTBLANKtakes exactly one. - Treating a cell containing a space as blank; it is not, and
COUNTBLANKwill not count it.
Frequently asked questions
Does COUNTBLANK count formulas that return ""?
Yes, it treats them as blank — the opposite of COUNTA, which counts them as filled.
How do I count blanks across several ranges?
Add several COUNTBLANK calls together; the function itself takes only one range.
Why do COUNTA and COUNTBLANK not add up to the range size?
Because cells holding formulas that return "" are counted by both. The overlap is exactly those cells.