Going Stellar

Home/Google Sheets reference

Google Sheets function · Math

COUNTBLANK in Google Sheets: syntax and examples

COUNTBLANK returns how many cells in a range are empty. Use it to find missing emails, unfilled form fields or gaps in a data block.

Syntax

COUNTBLANK(range)

Arguments

ArgumentTypeRequiredWhat it does
rangerangeyesThe cells to inspect.

Examples

The examples use this table, starting in A1:

NameEmailNote
Anaana@x.com
Bob
Crisc@x.com=""
=COUNTBLANK(B2:B4)

Result: 1

Missing emails in one column.

Run in a Google Sheet (English US locale) on .

=COUNTBLANK(C2:C4)

Result: 3

The third cell holds the formula ="" and still counts as blank.

Run in a Google Sheet (English US locale) on .

=COUNTBLANK(A2:C4)

Result: 4

Empty cells in the whole data block.

Run in a Google Sheet (English US locale) on .

=COUNTBLANK(A2:A4)

Result: 0

A column with no gaps returns 0.

Run in a Google Sheet (English US locale) on .

=IF(COUNTBLANK(B2:B4)>0, "missing", "complete")

Result: missing

A status flag for a data-entry check.

Run in a Google Sheet (English US locale) on .

Common errors

  • A cell that holds the formula ="" counts as blank, even though it is not truly empty. ISBLANK treats the same cell as not blank, so the two can disagree.
  • Zero and a single space are values, not blanks. A cell with 0 or " " is not counted.
  • In a locale that uses ";", wrapping COUNTBLANK in IF with comma separators returns #ERROR!.

Compared with Excel

Same syntax in Excel.

Sources

  1. COUNTBLANK (Docs Editors Help)

Markdown version · All functions