COUNTA Function in Excel: Count Non-Empty Cells

⏱ 1 min readUpdated 28 September 2026

StatisticalLevel: BeginnerAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. Common errors and fixes
  6. Related functions

COUNTA counts every cell that is not empty — numbers, text, errors and even formulas that return an empty string.

Syntax

=COUNTA(value1, [value2], ...)
Argument What it means
value1 Range or values to count.

Examples

Example 1

=COUNTA(A2:A1000)

Number of filled rows in a list of names.

Example 2

=COUNTA(A:A)-1

Rows of data in a column, minus the header.

Common errors and fixes

You see Why, and the fix
Counts “empty-looking” cells Cells with a space or a formula returning “” are counted. Use =SUMPRODUCT(–(LEN(TRIM(A2:A1000))>0)) for truly filled cells.

COUNT · COUNTBLANK · COUNTIF

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong