What is the COUNTBLANK function?
=COUNTBLANK(range)COUNTBLANK counts the empty cells in a range. Use it to see how many entries are still missing.
A cell containing 0 is not empty, so it is not counted. A cell whose formula returns an empty string ("") is counted as empty.
Arguments
- range
- The range to count empty cells in. Only one range is allowed.
COUNTBLANK examples
Example 1. Missing scores
=COUNTBLANK(B2:D6)Liam's Test 3 and Olivia's Test 1 are empty, so the result is 2. "Absent" is a value, so it is not counted.
Example 2. Missing Test 3 entries
=COUNTBLANK(D2:D6)D2 is empty, so the result is 1.
Example 3. No blanks
=COUNTBLANK(A2:A6)Every name is there, so the result is 0.
Common mistakes
Treating 0 as empty
A cell with 0 has a value and is not counted. To treat 0 as missing, add COUNTIF(range, 0).
Cells with spaces
A cell with a space looks empty but is not.
Several ranges
COUNTBLANK takes one range. Add one COUNTBLANK per range.
FAQ
- Counting non-empty cells?
- Use COUNTA.
- Formulas returning ""?
- They count as empty, which overlaps with COUNTA.
- Empty cells with a condition?
- Use "" as a criterion in COUNTIFS, for example =COUNTIFS(A2:A6, "Seoul", D2:D6, "").