COUNTA in Google Sheets: Count Filled Cells and Handle Blank-Looking Values

COUNTA counts cells containing values, including text, numbers, logical values and errors. It also counts spaces and formulas returning empty text, even when those cells look blank.

COUNTA function syntax

=COUNTA(value1, [value2, ...])
  • value1: the first value or range to count.
  • Further arguments: optional additional values or ranges.
  • A genuinely empty cell is excluded. Repeated values are counted each time they occur.

Set up the example data

Enter this dataset starting in A1. The first row contains headings. Keep the result area separate from the source table.

Entry
Maya
12
Leo
0
25

Count entries in a mixed column

Enter this formula in A10. Five of the six cells in A2:A7 contain entries. A4 is genuinely empty; the numeric zero in A6 still counts.

=COUNTA(A2:A7)

Result: 5.

Count entries in a mixed column in Google Sheets, with the formula and its result visible.

Count filled cells across a rectangle

Enter this additional table at A20. The range A21:C23 contains three rows and three columns, all filled. COUNTA therefore returns 9, counting cells rather than records.

NameStatusPoints
MayaActive10
LeoInactive20
AnaActive30
OmarInactive40
IvyActive50
=COUNTA(A21:C23)

Result: 9.

Count a list that contains gaps

A4 is blank, so the range A2:A5 contains three entries. COUNTA does not require the entries to be adjacent. Blank rows elsewhere do not stop it scanning the supplied range.

=COUNTA(A2:A5)

Result: 3.

Count names from a filtered list

FILTER selects names whose corresponding status is Active in the second table. All three matching names are present, so COUNTA returns 3.

=COUNTA(FILTER(A21:A25,B21:B25="Active"))

Result: 3.

Use COUNTIF when you want matching rows

For the simple status condition, COUNTIF directly counts matching cells and returns 3. It returns 0 if the requested status is absent, without needing FILTER.

=COUNTIF(B21:B25,"Active")

Result: 3.

See why visually blank cells can count

The first argument here is empty text, the second is one space, and the third is an #N/A error. COUNTA counts all three and returns 3.

=COUNTA(""," ",NA())

Result: 3.

Require a matching status and a present name

COUNTIFS requires Active in the status column and a nonempty name. On this complete example table, the answer remains 3. It gives zero when no row satisfies both conditions.

=COUNTIFS(B21:B25,"Active",A21:A25,"<>")

Result: 3.

Other Google Sheets articles you may also like