SheetsLessons
Math & Counting function

COUNTA function in Google Sheets

COUNTA counts every cell that isn't empty: numbers, text, TRUE/FALSE, even errors. Use it to count names, responses, or rows of data.

Syntax

=COUNTA(value1, [value2, ...])
value1
A cell, range or value to count.
value2, ...
Optional. More ranges or values.

Practice COUNTA

Task 1 of 1

How many guests have replied (any answer at all)? Answer in D2.

D2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

COUNTA examples

Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.

ABCD
1StudentClassScorePassed
2PriyaA92TRUE
3LeoB67FALSE
4ChloeA48FALSE
5MateoB81TRUE
6InesCFALSE
7KaiC75TRUE
Test scores (Ines missed the test)
FormulaResultWhat it shows
=COUNTA(A2:A7)6Number of students listed.
=COUNTA(C2:C7)5Scores entered. The blank cell is skipped.
=COUNTA(A1:D1)4Number of column headers.

Tips and common mistakes

  • A cell containing a formula that returns "" (an empty string) looks blank but is counted by COUNTA.
  • A single space typed into a cell also counts. TRIM your data if numbers look too high.

Related functions