The COUNTA function in Excel
COUNTA counts every cell that isn't empty: text, numbers, dates, TRUE/FALSE and even errors. Use it to count names on a list, responses to a survey question, or how many fields of a form were filled in. If you only want cells containing numbers, use COUNT instead.
Syntax
=COUNTA(value1, [value2], ...)
| value1 | The first cell, range or value to count. |
|---|---|
| value2, ... | Optional. More cells or ranges to add to the count. |
Try it yourself
This is a live spreadsheet. Type the formula and press Enter.
Customers could leave an optional comment with their rating. In E2, use COUNTA to count how many comments were left in C2:C8.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Comment | Comments left | |||||
| 2 | Fast checkout | ||||||
| 3 | |||||||
| 4 | Wish there were more sizes | ||||||
| 5 | Delivery was late | ||||||
| 6 | |||||||
| 7 | |||||||
| 8 | Item arrived damaged | ||||||
| 9 | |||||||
| 10 | |||||||
| 11 |
Tip: Count the non-empty cells in the Comment column only.
Examples
=COUNTA(A2:A7)→ 6Counts the names on the guest list, which is how many people have RSVPed.
=COUNTA(C2:C7)→ 3Counts how many guests entered a dietary requirement. Empty cells are skipped.
=COUNTA(A4:D4)→ 2Counts the filled-in fields on Owen's row. Handy for spotting incomplete records. Numbers count too, including 0.
Example data
| 1 | Guest | Dietary needs | Plus-ones | |
|---|---|---|---|---|
| 2 | Hannah Cole | hannah@example.com | Vegetarian | 1 |
| 3 | Raj Mehta | raj@example.com | 0 | |
| 4 | Owen Price | 2 | ||
| 5 | Lina Haddad | lina@example.com | Gluten-free | 0 |
| 6 | Mateo Silva | mateo@example.com | 1 | |
| 7 | Grace Lin | grace@example.com | Nut allergy | 0 |
Common mistakes
Cells that look empty but aren't
A stray space or a formula returning
""still counts. Clear the cell completely with Delete, or count real content withCOUNTIF(range,"?*")for text.Using COUNT on text
COUNT only counts numbers, so a list of names returns 0. Use COUNTA for text and mixed data.
Including the header row
COUNTA(A1:A7)counts the column title as an entry. Start the range on the first row of data.
FAQ
What is the difference between COUNT and COUNTA?+
COUNT counts only cells containing numbers. COUNTA counts any cell that isn't empty, including text.
Does COUNTA count zeros?+
Yes. A 0 is a value, so it's counted. Only truly empty cells are skipped.
How do I count blank cells instead?+
Use COUNTBLANK on the range, or subtract: =ROWS(A2:A7)-COUNTA(A2:A7).
Lesson
Master COUNTA step by step: COUNT, COUNTA and COUNTBLANK
Count numbers, filled cells and empty cells, a quick way to audit data.