Excel COUNTA Function (Count Non-Blank Cells) – Examples & Practice
Practice the Excel COUNTA function online with an interactive grid, instant feedback, and clear formula help.
Instruction
Count how many cells in A2:A6 are not empty.
Formula Syntax
=COUNTA(value1, [value2], ...)
- value1: First cell or range to evaluate.
- [value2]: Optional additional ranges.
- ...: Up to 255 arguments.
What it does
COUNTA counts how many cells are not empty. It includes numbers, text, and most formula results that are visible. Use it when “did someone fill this in?” matters more than numeric type.
Excel COUNTA Function Examples
Count filled cells in a column
=COUNTA(A2:A6)
Counts every non-blank cell in the range.
Count across two columns
=COUNTA(A2:A6, B2:B6)
Adds non-blank counts from both ranges.
text-cleanup.xlsx
| A | B | |
|---|---|---|
| 1 | Raw Text | Helper |
| 2 | ACME Corporation | ACME |
| 3 | Invoice-2026-0001 | 2026 |
| 4 | VIP_CLIENT | VIP |
| 5 | John Doe | Doe |
| 6 | Product Name | Product |
| 7 | Output |
Input Formula
Need Help?
Tips
- TRIM text first when spaces inflate COUNTA.
- Pair COUNTA with COUNT to detect text posing as blanks.
- Document whether headers are inside the counted range.
COUNTA Function Use Cases
- Measure completion rates on forms
- Count populated IDs before merging tables
- Sanity-check imports (expected number of rows filled)
- Track how many notes exist in a comments column
- Combine with COUNTBLANK to reconcile totals
Common mistakes - COUNTA function not working
- Counting spaces as valid data without TRIM
- Using COUNTA when you only want numeric COUNT
- Including title rows that always have text
- Ignoring formula-driven blanks
- Expecting COUNTA to ignore hidden rows unless paired with other logic
FAQ
Does COUNTA count formulas that return empty text?
Cells that look blank but contain formulas may still be counted depending on what the formula returns.
COUNTA vs COUNT?
COUNTA counts any non-empty cell. COUNT counts only numbers.
Does a space count?
Yes. A cell with only spaces is not truly empty and can be counted by COUNTA.
Can COUNTA count errors?
Error cells are not empty, so they can affect COUNTA results depending on context.
Is COUNTA good for attendance lists?
Yes. It is a quick way to measure how many responses exist in a column.
Comparison
| Function | What it counts |
|---|---|
| COUNTA | Any non-blank |
| COUNT | Numbers only |
| COUNTBLANK | Blanks only |
Example
=COUNTA(A2:A6) counts non-empty cells.
Advanced examples
Count distinct entries
COUNTA does not dedupe. For unique values, pair with UNIQUE in modern Excel:
=COUNTA(UNIQUE(A2:A20))
Related functions
Compare COUNT when you only care about numeric entries, and COUNTBLANK when empties are the story.
For filtered populations, COUNTIF / COUNTIFS express the same idea with explicit criteria.