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], ...)
| Argument | Required? | What it is |
|---|---|---|
value1 | Required | The first value, cell or range to count. |
value2 | Optional | More 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.
| Cell | Formula | Result | What it shows |
|---|---|---|---|
| F2 | =COUNTA(A2:A6) | 5 | Every guest with a name entered |
| F3 | =COUNTA(C2:C6) | 2 | Guests who left a note |
| F4 | =COUNTA(A2:A6)-COUNTA(B2:B6) | 2 | Guests 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
| Name | Dietary note | Check | Result | ||
| Ana Diaz | ana@example.com | Vegetarian | Guests | 5 | |
| Raj Patel | raj@example.com | Dietary notes | 2 | ||
| Lee Wong | Nut allergy | Missing emails | 2 | ||
| Kim Park | kim@example.com | ||||
| Mo Saleh |
Practice COUNTA
From lesson 2, SUM, AVERAGE, MIN, MAX & COUNT. Graded instantly, then re-checked on changed data.
Counting cells
E6, count the days with a sales number. In E7, count how many days are listed in column A.Common mistakes
| What you see | Why, and how to fix it |
|---|---|
| The count is higher than expected | Cells 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 header | COUNTA(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.