Going Stellar

Home/Google Sheets reference

Google Sheets function · Statistical

COUNTA in Google Sheets: syntax and examples

COUNTA counts the cells that contain anything at all. Use it to see how many rows are filled in, or how many are missing, in a column.

Syntax

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

Arguments

ArgumentTypeRequiredWhat it does
value1anyyesThe first value or range to count. Any non-empty cell counts, whatever it holds.
value2anynoMore values or ranges, added to the same count.

Examples

The examples use this table, starting in A1:

NameEmailPhoneNote
Anaana@example.com0722ok
Bogdan0733
Carmencarmen@example.comok
Dandan@example.com0744ok
=COUNTA(A2:A5)

Result: 4

Counts the filled cells in the name column.

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

=COUNTA(B2:B5)

Result: 3

One email is missing, so the count is 3 and not 4.

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

=COUNTA(A2:D5)

Result: 13

A whole block: every non-empty cell across all four columns.

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

=COUNTA(B2:B5, D2:D5)

Result: 6

Two ranges in one call. The counts are added together.

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

=ROWS(A2:A5)-COUNTA(B2:B5)

Result: 1

Missing values: total rows minus filled cells.

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

Common errors

  • A cell with a formula that returns an empty string ("") still counts, because the cell is not empty. A visible blank can raise the total.
  • 0 and FALSE are counted. Only truly empty cells are skipped.
  • COUNTA is not COUNT. COUNT counts numbers only, so on a column of emails it returns 0.

Compared with Excel

Same syntax as Excel COUNTA.

Sources

  1. COUNTA (Docs Editors Help)

Markdown version · All functions