How to use COUNTA in Excel
COUNTA counts every cell that is not empty — numbers, text, dates, TRUE/FALSE and errors. Use it to count names, responses or filled-in rows.
Syntax
=COUNTA(value1, [value2], ...)
value1 | A range or value. |
[value2], … | Optional additional ranges. |
Examples
=COUNTA(A2:A500)Number of people in a list.=COUNTA(B2:B50)/ROWS(B2:B50)Share of questions answered.How many rows does the data have?
COUNTA on a column that is always filled, like an ID, tells you how many records there are. That's useful for checks and for ranges that grow.
=COUNTA(A2:A5000)The number of accounts in the list.="Rows: "&COUNTA(A2:A5000)&", total: "&TEXT(SUM(C2:C5000), "#,##0.00")A one-line control total for a report.Completeness checks
Compare COUNTA on a required column with the number of records to see how many are missing.
=COUNTA(A2:A500)-COUNTA(D2:D500)How many records have no value in column D.=COUNTA(D2:D500)/COUNTA(A2:A500)The share of records that are complete (format as %).Common mistakes
- Cells that look empty are counted
- A formula that returns
""or a cell with a space is not empty for COUNTA. UseCOUNTIF(range, "?*")to count only real text. - Headers included
- Start the range below the header row.
Frequently asked questions
What's the difference between COUNT and COUNTA?
COUNT counts only numbers. COUNTA counts every cell that isn't empty: numbers, text, dates, TRUE and FALSE, and errors.
Why does COUNTA count cells that look empty?
They aren't really empty: a space, an apostrophe, or a formula that returns "". Use =SUMPRODUCT(--(LEN(TRIM(A2:A500))>0)) to count only cells with visible content.
How do I count non-empty cells with a condition?
Use COUNTIFS with "<>": =COUNTIFS(B2:B500, "North", D2:D500, "<>").
How do I count empty cells?
With COUNTBLANK: =COUNTBLANK(D2:D500). It also counts formulas that return an empty text.
Available in: All versions of Excel, Excel for the web, Google Sheets