Excel Function

Excel COUNTA function

Count every non-empty cell — numbers, text, errors, anything that isn't blank.

COUNTA counts all non-blank cells in a range — numbers, text, logical values (TRUE/FALSE), errors, and even cells that appear blank but contain a space character. It is the right choice when you want to know "how many entries are there?" regardless of what type those entries are.

Syntax

COUNTA(value1, [value2], ...)
ArgumentWhat it means
value1 requiredA range, cell, or value to count.
value2, ... optionalAdditional ranges or values. Up to 255 arguments.

Basic examples

=COUNTA(A2:A100) -- Counts every non-blank cell in A2:A100 =COUNTA(A:A) - 1 -- Count entries in the whole column, minus 1 for the header row

Practical uses

Auto-numbering rows

=COUNTA($A$2:A2) -- Drag down to auto-number rows sequentially -- As you add data in column A, row numbers appear automatically

Dynamic range for SEQUENCE

=SEQUENCE(COUNTA(A2:A100)) -- Generate as many sequence numbers as there are entries in the list
⚠️ Watch out for "ghost" cells

COUNTA counts cells containing a space character as non-blank, even though they look empty. If your count seems wrong, check for accidental spaces using TRIM and then re-count.

Does COUNTA count error cells like #N/A?
Yes — COUNTA counts any non-blank cell, including cells containing errors. To count only non-error, non-blank cells, use SUMPRODUCT with ISNUMBER or combine COUNTA with COUNTIF.
What is the difference between COUNTA and COUNT?
COUNT counts only numeric values (numbers, dates, times). COUNTA counts everything that isn't blank. Use COUNTA when your column contains text entries or mixed data types.

Practice COUNTA for real

Type it in a live spreadsheet, get instant feedback. No videos, no downloads.

Start practising free →