COUNTA
Count cells that hold anything at all, including text.
Syntax
COUNTA(value1, [value2], ...) | Argument | Required | Description |
|---|---|---|
value1 | Required | A range or value to count. |
value2 | Optional | Further ranges or values. |
Examples
Every example below was executed against VisiGrid engine 0.35.0 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=COUNTA(A1:A5) | 4 | |
=COUNT(A1:A5) | 3 | COUNT ignores the text; COUNTA does not. |
Counting rows, not values
COUNTA is how you count records — how many rows have anything in the key
column — because a record with a text identifier still counts:
=COUNTA(A2:A1000)
Beware that a formula returning "" is not empty. It holds an empty string,
which COUNTA counts. A column of =IF(...,"",...) formulas will report as
fully populated even where it looks blank, which is one of the more confusing
discrepancies in any spreadsheet.
Excel compatibility
Matches Excel.