COUNTA
Counts non-empty cells and scalar arguments.
COUNTA counts any value except true empty cells.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=COUNTA(value1, [value2], ...)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
value1 | any | Required | — |
value2 | any | Optional | — |
Accepts a variable number of arguments. Minimum: 1.
Remarks
- Numbers, text, booleans, and errors all count.
- Empty string values (
"") are counted as non-empty. - Truly empty cells are the only values excluded.
Examples
Count a number and text while leaving the blank cell out.
Formula =COUNTA(A1:A3)
| A | |
|---|---|
| 1 | 3 |
| 2 | "five" |
| 3 | (blank) |
Expected result 2
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Include an error cell, which is still a populated cell.
Formula =COUNTA(A1:A4)
| A | |
|---|---|
| 1 | 3 |
| 2 | "five" |
| 3 | (blank) |
| 4 | =1/0 |
Expected result 3
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A reference to a genuinely empty cell contributes zero.
Formula =COUNTA(A3)
| A | |
|---|---|
| 3 | (blank) |
Expected result 0
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Count mixed populated values
Formula =COUNTA(1, "x", TRUE, "")
Expected result 4
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Range count excludes only true blanks
Formula =COUNTA(A1:A3)
| A | |
|---|---|
| 1 | 10 |
| 2 | "" |
Expected result 2
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Errors are counted
Formula =COUNTA(1/0, 5)
Expected result 2
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Does COUNTA count empty-string results like ""?
Yes. Empty text is counted as non-empty by COUNTA.
Are error values counted?
Yes. Errors are considered populated values and increase the count.