Statistical

COUNTA Formula

COUNTA counts the number of non-empty cells in a range, regardless of whether they contain text, numbers, errors, or formulas returning empty strings. It is the go-to function for counting how many entries exist in a list, determining the last row of data, or checking how complete a column is.

Syntax

COUNTA(value1, [value2, ...])
ParameterDescription
value1 Parameter of the COUNTA function.
[value2 (Optional.) Parameter of the COUNTA function.
...] Parameter of the COUNTA function.
Try COUNTA in Viztab — free, no signup

Examples

Count non-empty cells

Formula
=COUNTA(A2:A500)
Returns: 234 — the number of cells that are not blank in the range

Find the last row of data

Formula
=COUNTA(A:A)
Returns: 501 — total non-empty cells in column A (including the header), useful for dynamic ranges

Percentage of fields filled

Formula
=COUNTA(B2:B100)/ROWS(B2:B100)
Returns: 0.87 — 87% of cells in the range have data

Common Errors

Overcounts

COUNTA counts cells with formulas that return "" (empty string) as non-empty. These look blank but are not truly empty.

Tips

Formulas returning "" count as non-empty

A cell with =IF(A1>0, A1, "") appears blank but COUNTA counts it. Use SUMPRODUCT(1*(B2:B100<>"")) instead.

Dynamic named ranges

Use COUNTA to create dynamic ranges: =OFFSET(A1, 0, 0, COUNTA(A:A), 1) expands as data grows.

Count text only

To count only text cells (no numbers): =SUMPRODUCT(ISTEXT(A2:A100)*1).

Try COUNTA in Viztab

Import your data and use COUNTA with 370+ other formulas. No signup required.

Open Viztab

Related Formulas