What is the COUNTA function?
=COUNTA(value1, [value2], ...)COUNTA counts the cells that are not empty. Numbers, text and error values all count.
Use it to count people on a list or entries made. A cell whose formula returns an empty string ("") also counts as not empty.
Arguments
- value1
- The cells or range to count.
- value2, ...
- Optional. Up to 255 arguments.
COUNTA examples
Example 1. Cells with entries
=COUNTA(B2:D6)Counts 13 of 15 cells, leaving out the 2 blanks. "Absent" is a value, so it counts.
Example 2. People on the list
=COUNTA(A2:A6)There are 5 names, so the result is 5. COUNT gives 0 on the same range.
Example 3. People with a Test 2 record
=COUNTA(C2:C6)3 scores and 2 "Absent" are all values, so the result is 5. COUNT gives 3.
Common mistakes
A cell with a space
A cell that looks empty but holds a space counts. If the result is too high, look for spaces.
Formulas returning ""
COUNTA counts cells with formulas such as =IF(…, "", …).
Wanting only numbers
Use COUNT.
FAQ
- Does COUNTA + COUNTBLANK equal the total?
- Usually, but not always. Cells with formulas returning "" are counted by both.
- Are errors counted?
- Yes. Cells with errors such as #N/A count.
- Only cells meeting a condition?
- Use COUNTIF or COUNTIFS.