COUNTA Function

Excel Functions › Statistical

All versions Statistical

The Excel COUNTA function counts how many cells are not empty — numbers, text, dates, logical values, and error values all count. Only truly blank cells are skipped.


Quick answer:
=COUNTA({1,"x",3,""}) = 4 (the "" is a non-empty value)

Syntax

=COUNTA(value1, [value2], ...)
ArgumentDescription
value1RequiredThe first item, cell, or range to count non-empty cells in.
value2, ...OptionalUp to 255 additional items or ranges.

How to use it

COUNTA counts every cell that holds anything at all — numbers, text, dates, TRUE/FALSE, and even error values. It is the go-to for “how many rows are filled in?”

=COUNTA({1,"x",3,""}) // = 4
=COUNTA({1,2,3,4,5}) // = 5

Note that an empty string ("") produced by a formula counts as non-empty — only a genuinely empty cell is skipped. To count numbers only, use COUNT; to count blanks, use COUNTBLANK.

Watch out for “invisible” entries. A formula that returns "" still counts in COUNTA even though the cell looks empty. If your count seems too high, that's often the cause.

Try it: interactive demo

Live demo

Pick a COUNTA example to see the formula and its result.

Result:

Practice workbook

📊
Download the free COUNTA practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What is the difference between COUNT and COUNTA?
COUNT counts only numbers; COUNTA counts all non-empty cells — numbers, text, dates, logical values, and errors. Only truly blank cells are excluded.
Does COUNTA count an empty string?
Yes. A cell containing "" (often the output of a formula) is treated as non-empty and is counted, even though it looks blank.
Does COUNTA count error values?
Yes — cells containing error values are not empty, so COUNTA includes them in the count.
How do I count only the blank cells instead?
Use COUNTBLANK, which counts empty cells (including formulas that return "") in a range.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: COUNT · COUNTBLANK · COUNTIF · COUNTIFS · SUM · AVERAGE