Skip to main content
SheetCraft
📊 Statistical Function · beginner

COUNTA Function in Google Sheets

Counts the number of non-empty cells in a range — text, numbers, dates, even error values. Use this when you want to know "how many cells have something in them."

Syntax

COUNTA(value1, [value2, ...])

Returns: The number of non-empty cells.

Excel equivalent: COUNTA (identical)

Parameters

NameRequiredDescription
value1, value2, ...RequiredValues, cell references, or ranges to count. COUNTA counts every non-empty cell across all arguments.

Examples

Count filled rows in a column

=COUNTA(A2:A1000)

Returns how many cells in A2:A1000 have any content — useful for counting records in a table.

Get the last row of data

=COUNTA(A:A)

Returns the count of all non-empty cells in column A, which equals the row number of the last filled cell when data is contiguous from row 1.

Multiple disjoint ranges

=COUNTA(A2:A100, C2:C100, E2:E100)

Counts non-empty cells across three separate ranges.

When to use an alternative

  • COUNTYou only want to count cells containing numbers, not text.
  • COUNTIFYou want to count cells matching a specific condition, not just non-empty.
  • COUNTBLANKYou want the inverse — count empty cells.

Common errors and how to fix them

  • Counts cells that look empty

    Cause: Cell contains an empty string "" or a formula returning "" — these are technically non-empty.

    Fix: Use COUNTIF(range, "<>") to count cells that aren't blank AND aren't empty strings.

  • Off by one from expected

    Cause: Includes the header row.

    Fix: Start the range below the header: COUNTA(A2:A1000) instead of COUNTA(A:A) when row 1 is a header.

Related functions

Frequently Asked Questions

Does COUNTA count an empty-string formula result?

Yes. A cell containing ="" is technically non-empty and COUNTA includes it. If you want to exclude empty-string results, use COUNTIF(range, "?*") which only matches cells with at least one character.

How is COUNTA different from COUNT?

COUNT only counts numeric cells. COUNTA counts any non-empty cell — text, numbers, dates, booleans, and errors all count. Use COUNT when you want "how many numbers", COUNTA when you want "how many filled cells".

Source: Google Sheets official function reference.