Templates, guides & honest tool reviews for small business

Sunday, November 29, 2026

COUNT vs COUNTA vs COUNTBLANK in Excel: What Each One Counts

COUNT, COUNTA and COUNTBLANK in Excel: the difference
Illustration: COUNT, COUNTA and COUNTBLANK in Excel

The difference between COUNT, COUNTA and COUNTBLANK in Excel is simple once you know what each one counts: COUNT counts numbers, COUNTA counts cells that are not empty and COUNTBLANK counts empty cells. Picking the wrong one is a common reason for a total that looks too high or too low. This guide explains each function with made-up data and shows the special cases, such as dates, text numbers and cells that look empty.

COUNT: numbers only

=COUNT(value1, [value2], ...)

COUNT counts the cells that contain numbers. Dates and times also count, because Excel stores them as numbers. Text, errors and empty cells are ignored. For a range A2:A8 with the values 10, 25, "n/a", an empty cell, 7, 3 and a date, COUNT returns 5.

=COUNT(A2:A8)

COUNT function in Excel counts numbers and dates only
Made-up range A2:A8 (illustration).

COUNTA: everything that is not empty

=COUNTA(value1, [value2], ...)

COUNTA counts any cell that has something in it: numbers, text, dates, errors and even a single space. For the same range, COUNTA returns 6, because only the empty cell is skipped.

=COUNTA(A2:A8)

Use COUNTA to count how many names, IDs or entries a column has.

COUNTA function in Excel counts cells that are not empty
Text, errors and spaces count too (illustration).

COUNTBLANK: empty cells

=COUNTBLANK(range)

COUNTBLANK counts the empty cells in a range. It also counts cells that contain a formula returning empty text, such as ="". It does not count a cell with a zero or a space. For the same range, COUNTBLANK returns 1.

=COUNTBLANK(A2:A8)

COUNTBLANK function in Excel counts empty cells
Also counts empty text from formulas (illustration).

Compare the three

With 7 cells in the range: COUNT 5, COUNTA 6, COUNTBLANK 1. COUNTA plus COUNTBLANK gives the total number of cells only when no formula returns empty text, so do not rely on that as a check.

COUNT versus COUNTA versus COUNTBLANK in Excel comparison
Same range, three results (illustration).

Count with a condition

These three functions have no condition. For a condition, use COUNTIF or COUNTIFS. For example, =COUNTIF(A2:A8, "<>") counts non-blank cells, and =COUNTIF(A2:A8, "") counts blank cells. Our guide to COUNTIFS with multiple criteria covers the conditional versions.

Numbers stored as text

If COUNT returns less than you expect, some numbers may be stored as text. They show as left aligned, and often have a small green triangle. COUNT ignores them but COUNTA counts them. Convert them with VALUE or the Text to Columns tool, then count again. A related example is in the LEFT, RIGHT and MID guide, where extracted digits are text until you convert them.

Cells that look empty but are not

A cell with a space, an apostrophe or a formula that returns an empty string looks blank, but COUNTA counts it. To find them, use =SUMPRODUCT(--(LEN(TRIM(A2:A8))=0)), which counts cells that are empty after trimming spaces. The SUMPRODUCT function is explained in our SUMPRODUCT guide.

Count rows in a table

To count the number of records in a table, count a column that always has a value, such as an ID, with COUNTA. If the ID column has blanks, the count is too low.

Common mistakes

  • Using COUNT on text. It returns 0 for a list of names. Use COUNTA.
  • Header row included. Start the range below the header.
  • Hidden spaces. COUNTA counts them. Clean the data with TRIM.
  • Expecting COUNTBLANK to include zeros. It does not.

Questions and answers

Do these functions work in Google Sheets?

Yes. COUNT, COUNTA and COUNTBLANK exist in Google Sheets with the same purpose.

How do I count unique values?

Use UNIQUE with COUNTA in Excel 365 and Excel 2021, as in =COUNTA(UNIQUE(A2:A100)). In Google Sheets there is COUNTUNIQUE.

Why does COUNTA count my empty looking cells?

They probably hold a space or a formula that returns empty text.

What is the difference between COUNT and COUNTIF?

COUNT counts numbers with no condition. COUNTIF counts cells that meet a condition you set.

Summary

Use COUNT for numbers, COUNTA for any entry and COUNTBLANK for empty cells. Check for text numbers and hidden spaces when a result seems wrong.

العربية