The COUNTA function
COUNTA counts cells that have *anything* in them: names, numbers, dates, TRUE/FALSE, even error values. Only truly empty cells are skipped.
Use it to count names on a list or rows that have been filled in. COUNT, by contrast, only counts numbers.
=COUNTA(value1, [value2], ...)
Arguments
- value1
- The first range or cell to count.
- value2, ...optional
- More ranges or cells to include.
Try it
=COUNTA(A2:A7) in D2. Five cells in the name column have something in them; row 5 is empty, so COUNTA gives 5.
D2
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Name | Paid | Signed up | ||
| 2 | Hannah | £15.00 | 5 | ||
| 3 | Dev | £15.00 | |||
| 4 | Oliver | ||||
| 5 | |||||
| 6 | Grace | TBC | |||
| 7 | Callum | £15.00 | |||
| 8 | |||||
| 9 |
Edit the formula in D2, or change the data, and press Enter.
More examples
| Formula | Result | What it does |
|---|---|---|
| =COUNTA(B2:B7) | 4 | Three payments plus the text TBC. |
| =COUNT(B2:B7) | 3 | COUNT ignores TBC because it's text. |
| =COUNTA(A2:A7,"Guest") | 6 | A typed value counts as one more. |
| =ROWS(A2:A7)-COUNTA(A2:A7) | 1 | Rows in the range minus filled cells gives the number of gaps. |
Tips
- Leave the header out of the range, or the count is one too many.
- To count only cells that match something, such as "Paid", use COUNTIF.
Common mistakes
- COUNTA counts cells that look empty.They contain something invisible: a space, or a formula returning
"". Clear them properly, or count with=COUNTIF(A2:A7,"?*")for cells with at least one character of text. - The count is one higher than the number of people.The range includes the heading in row 1. Start it at row 2.
Practise COUNTA with instant feedback
Type real formulas into a working spreadsheet and get told straight away whether they work.