Spreadsheet Practice

COUNTA function

COUNTA counts every cell that isn't empty: text, numbers, dates, errors and even formulas that return empty text. It's the usual way to count names in a list or responses to a question, and the difference between two COUNTA results shows how many rows are missing something.

Available in
Every current version
Category
Statistical functions
Returns
The number of cells that aren't empty.
Google Sheets
Also available in Google Sheets.

Syntax

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

ArgumentRequired?What it is
value1RequiredThe first value, cell or range to count.
value2OptionalMore values, cells or ranges, up to 255 in total.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
F2=COUNTA(A2:A6)5Every guest with a name entered
F3=COUNTA(C2:C6)2Guests who left a note
F4=COUNTA(A2:A6)-COUNTA(B2:B6)2Guests still missing an email address

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
NameEmailDietary noteCheckResult
Ana Diazana@example.comVegetarianGuests5
Raj Patelraj@example.comDietary notes2
Lee WongNut allergyMissing emails2
Kim Parkkim@example.com
Mo Saleh

Practice COUNTA

From lesson 2, SUM, AVERAGE, MIN, MAX & COUNT. Graded instantly, then re-checked on changed data.

Counting cells

In E6, count the days with a sales number. In E7, count how many days are listed in column A.

Common mistakes

What you seeWhy, and how to fix it
The count is higher than expectedCells with a space or a formula that returns "" aren't empty, so COUNTA counts them. Clear the cells or use COUNTIF(range,"?*") to count real text.
Counting a whole column includes the headerCOUNTA(A:A) counts the header row too. Subtract 1 or start the range below the header.

Tips

  • COUNTA of a column is a quick way to find the last row of a list that has no gaps.

Questions

Does COUNTA count cells with formulas that return blank?

Yes. A formula returning "" is not empty, so COUNTA counts it. COUNTBLANK counts it as blank, which is why the two don't always add up to the range size.

How do I count cells that contain text only?

Use =COUNTIF(A2:A6,"*"), which counts text and skips numbers.

Lessons that use COUNTA

Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.