COUNTA Function

Counts cells that aren't empty.

Category

Statistical

Available in

All versions, Microsoft 365

Returns

A whole number

Taught hands-on in Level 2: Essential Formulas & Everyday Logic · Frequently Used Functions module

Overview

COUNTA counts every cell that contains anything — numbers, text, TRUE/FALSE, errors, and even formulas that return empty text (""). Only truly empty cells are left out.

Syntax

=COUNTA(value1, [value2], …)

Arguments

ArgumentRequired?What it does
value1YesA value, cell or range.
value2, …NoUp to 255 more values, cells or ranges.

Examples

Example 1 — How many people responded?

Any entry counts, including "absent" and "pending". Only Di's blank cell is skipped.

D2fx=COUNTA(B2:B8)
ABCD
1NameScoreEntries
2Ana826
3Benabsent
4Cy91
5Di
6Ed77
7Fay0
8Guspending
=COUNTA(B2:B8) Explain

Example 2 — Count a list that grows

Count names in column A, minus the header.

=COUNTA(A:A)-1 Explain

Useful for numbering or for a dynamic range.

Common mistakes

  • Cells that look empty are counted. A space, or a formula returning "", counts as an entry. Use COUNTBLANK or =SUMPRODUCT(--(LEN(B2:B8)>0)) to count visible entries only.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.