
COUNTA
The COUNTA function returns the number of its arguments that are not empty.
COUNTA(value, value…)
value: Any value or a collection containing any values.
value…: Optionally include one or more additional values or collections.
Examples |
---|
The information in the following table is not meaningful, but is useful to illustrate the type of arguments COUNTA includes in its result. Given the following table: |
A | B | C | D | |
---|---|---|---|---|
1 | 100 | 200 | 300 | 400 |
2 | lorem | ipsum | dolor | sit |
3 | 100 | 200 | 300 | sit |
4 | TRUE | TRUE | FALSE | FALSE |
5 | 200 | 400 |
=COUNTA(A1:D1) returns 4, because all cells contain an argument (all numeric). =COUNTA(A2:D2) returns 4, because all cells contain an argument (all text). =COUNTA(A3:D3) returns 4, because all cells contain an argument (mix of text and numeric). =COUNTA(A4:D4) returns 4, because all cells contain an argument (TRUE or FALSE). =COUNTA(A5:D5) returns 2, because only two cells contain an argument (the other two are empty). =COUNTA(2, 3, A5:D5, SUM(A1:D1), "A", "b") returns 7, because the arguments 2 and 3 are numbers, there are 2 cells that are not empty in the collection referenced by the range A5:D5, the SUM function returns 1 number, and "A" and "b" are text expressions (altogether 7 arguments). |
Example—Survey results |
---|
To see an example of this and several other statistical functions applied to the results of a survey, see the COUNTIF function. |