COUNTA in Excel: Count Non-Empty Cells in a Range
Counts number of cells that are not empty in a range.
How to Count Non-Empty Cells with COUNTA in Excel
The COUNTA function counts the number of cells in a range that are not empty (including text, numbers, dates, booleans, and errors).
Syntax
=COUNTA(value1, [value2], ...)
COUNT vs COUNTA
- COUNT: Counts cells with numbers only.
- COUNTA: Counts cells containing any type of data.
Common Errors & Fixes
COUNTA counts more cells than expected
Causes:- Cells that appear empty may contain formula-generated empty strings ("").
- Hidden spaces or non-printable characters make cells appear non-empty.
Fixes:- Use COUNTIF(range, "?*") to count only cells with visible text.
- Use SUMPRODUCT(--(TRIM(range)<>"")) to exclude blank-looking cells with spaces.
Frequently Asked Questions
What is the difference between COUNTA and COUNT?
COUNTA counts all non-empty cells including text, numbers, errors, and logical values. COUNT only counts cells containing numeric values.
Does COUNTA count cells with formulas?
Yes, COUNTA counts a cell if its formula returns any value — even an empty string "". COUNTA only excludes truly blank cells.
Does COUNTA work in Google Sheets?
Yes, COUNTA works identically in Google Sheets with the same syntax.
Related Formulas
Explore related formula generators to solve similar problems
🛠️ Related Tools
Want to become an Excel Pro?
Stop searching for formulas. Master Excel in 30 days with this top-rated course.
Learn More