COUNTA
Count non-empty cells in Excel, regardless of whether they contain numbers, text, or errors.
Spreadsheet editor
Spreadsheet editor
Syntax
=COUNTA(value1, [value2, ...])
Returns: Number Arguments
| Argument | Required | Description |
|---|---|---|
| value1 | Yes | The first argument representing the range, cell references, or individual values to be counted. This can be a reference to cells, ranges, or actual values. |
| ... | No | Additional arguments representing the range, cell references, or individual values to be counted. These can be references to cells, ranges, or actual values separated by commas. |
About
This function is helpful for tracking response rates in surveys, checking how many team members submitted data, or verifying that required fields are filled in. If a cell looks empty but contains a formula like ="", COUNTA counts it because technically there's content there.
For counting only numbers, use COUNT. For counting cells that meet specific conditions, check out COUNTIF and COUNTIFS.
Exercises using COUNTA
Count items in a list
BeginnerCount how many products are in the inventory list.
Open exerciseCount non-empty cells
BeginnerCount how many survey respondents answered using the COUNTA function.
Open exerciseOFFSET for dynamic range selection
IntermediateUse OFFSET to build a range that always returns the last N sales entries.
Open exerciseOFFSET for a trailing 12-month sum
IntermediateBuild a trailing 12-month revenue summary that updates automatically as new monthly rows are added.
Open exerciseExamples
Error values inflate your counts
Spreadsheet editor
Count multiple ranges at once
Spreadsheet editor
Watch out for
Formulas returning empty text still count
Cells with formulas like =IF(A1="","",A1) appear empty but COUNTA counts them because they contain a formula.
→ If you want truly blank cells to not count, use COUNTBLANK or modify your formulas to return nothing when conditions aren't met.
Different from COUNT for mixed data
In a column with both numbers and text, COUNTA counts everything while COUNT only tallies numbers, leading to confusion.
→ Remember: COUNTA is for any content, COUNT is for numbers only. Choose based on what you're actually measuring.