formulastreak

Conditional totals function

COUNTBLANK function in Google Sheets and Excel

COUNTBLANK counts the empty cells in a range, including cells whose formula returns empty text.

Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet

Syntax

COUNTBLANK(range)

Arguments in [brackets] are optional. Google Sheets writes it COUNTBLANK(range).

Example

=COUNTBLANK(C2:C11) reads: Count how many cells in the age column C2:C11 are empty.

Member sign-ups · edit G1 and watch it recalculate
Click a cell (or use the arrow keys) to insert its address · Enter shows the resultG1 = 1
ABCDEFG
1EmailNameAgePlanJoinedMissing ages1
2mara@example.comMara34Pro12 Jan 2026
3jonas@example.orgJonas41Basic15 Jan 2026
4MARA@example.comMara O.34Pro20 Jan 2026
5priya@example.netPriyaTeam2 Feb 2026
6tomas@example.comTomásn/abasic9 Feb 2026
7elif@example.orgElif29Pro17 Feb 2026
8jonas@example.orgJonas Lind41Basic23 Feb 2026
9kenji@example.netKenji52Enterprise3 Mar 2026
10sofia@example.comSofia23Team8 Mar 2026
11leo@example.orgLeo17Basic14 Mar 2026

G1 shows 1: Priya's age is missing.

How the spreadsheet calculates it

Counts the empty cells in C2:C11.

  1. 1. COUNTBLANK: Counts the empty cells in C2:C11.
    • range = `C2:C11`: the cells to check

More COUNTBLANK examples

  • =COUNTBLANK(A2:E11)Empty cells anywhere in the sign-up table.
  • =COUNTBLANK(C2:C11)/ROWS(C2:C11)The share of members with no age (format as %).
  • =IF(COUNTBLANK(A2:E2)>0,"Incomplete","Complete")A row check: does this sign-up have every field?
  • =ROWS(C2:C11)-COUNTBLANK(C2:C11)How many ages are filled in.

Paste any of these into the formula explainer to see it step by step.

Tips

  • Run it on every required column after an import to see where data is missing.
  • Show missing values as a percentage so different-sized columns compare fairly.
  • Remember that spaces and zeros aren't blank.
  • Put the count next to the column header in a check row, so anyone opening the file sees at a glance how much data is missing.

What COUNTBLANK is used for

Data-quality checks on imports and forms (how many emails, ages or prices are missing), progress tracking on checklists, and alerts before a report is sent with gaps.

Arguments

ArgumentRequiredWhat it is
rangeYesThe range to check, such as C2:C11.

Common mistakes

  • Expecting a cell with a space in it to count as blank: it doesn't.

  • Expecting zeros to count: a cell holding 0 isn't blank.

  • Being surprised by formulas: a formula that returns "" looks empty and COUNTBLANK counts it, while ISBLANK says FALSE for the same cell.

In Google Sheets

Google Sheets has COUNTBLANK(range) with the same single argument. We haven't verified that it treats formulas returning "" exactly as Excel does, so test that case if your sheet relies on it.

Errors you may see with COUNTBLANK

  • #REF!: Rows or columns the range pointed at were deleted, so the formula holds #REF! instead of a range.

Questions

How do I count empty cells in Excel?

COUNTBLANK(range). On this sheet COUNTBLANK(C2:C11) is 1: one member has no age.

How do I count cells that are not empty?

Use COUNTA for anything that isn't empty, or subtract: ROWS(C2:C11)-COUNTBLANK(C2:C11).

Does COUNTBLANK count cells with a space?

No. A space is a character, so the cell isn't blank. Find such cells with COUNTIF(range," ") or clean them with TRIM.

How do I show the share of missing values?

Divide by the number of rows: COUNTBLANK(C2:C11)/ROWS(C2:C11), formatted as a percentage.

What's the difference between COUNTBLANK and ISBLANK?

COUNTBLANK counts the empty cells of a whole range and gives one number. ISBLANK checks one cell and gives TRUE or FALSE, which suits an IF in a check column. They also disagree on formulas that return "": COUNTBLANK counts those cells as blank, ISBLANK doesn't.

Sources

Official documentation the facts on this page were checked against.

Practise COUNTBLANK on a live sheet

Lesson 34, Check and convert types (Unit 9, Data quality), has 6 graded exercises, checked instantly, with steps and hints when you're stuck. Pro