COUNTA Google Sheets Function [With Quiz]
In Google Sheets the COUNTA function COUNTs All values present in the arguments provided.
If you need to count only numerical values, use the COUNT function instead.
COUNTA Syntax
- value1 = a value, cell reference, or range reference from which to count values.
- [value2, ...] = [optional] additional values, cell references, or range references to count.
All data types are counted by COUNTA. The common ones AND the obscure ones:
- Numbers (positive, negative, zero)
- Text
- Boolean
- Dates, times, durations
- Images in cells
- Charts in cells (sparklines)
- Hyperlinks
- Errors
FREE RESOURCE
Google Sheets Cheat Sheet
12 exclusive tips to make user-friendly sheets from today:
You'll get updates from me with an easy-to-find "unsubscribe" link.
COUNTA Function Example
A | B | C | |
1 | Data | Formula | Output |
2 | 10 | =COUNTA(A2:A) | 5 |
3 | TRUE | ||
4 | 1 January | ||
5 | Text | ||
6 | 00:30 |
The output is 5 because ALL values are counted.
The arguments to COUNTA can be provided as values (numbers, text, or BOOLEAN), cell references, or range references:
The COUNTA function counts whitespace and empty strings as values.
This can cause you to question its output. Especially if you use formulas like:
If A1=A2 is FALSE the output is an empty string ("") which appears in Google Sheets as a blank cell. However, COUNTA will still count it as a value.
I've encountered this quirk before and it can make outputs from formulas that rely on COUNTA very confusing.
COUNTA Errors
The COUNTA function outputs almost no errors.
It outputs effectively even when inputs include blank cells (which count as 0) and errors (which each count as 1).
The only error I could cause with COUNTA was not including any arguments:
Which results in an #N/A error:
Wrong number of arguments to COUNTA. Expected at least 1 arguments, but got 0 arguments.
COUNTA Function Quiz
Here's a quick summary of how to use the quiz spreadsheet:
- Select the required cell while the formula bar is empty
- Type your answer in the formula bar
- You can click on the spreadsheet to add cell/range references
Complete all questions to solidify your understanding of the COUNTA function.
A | B | C | |
1 | Salesperson | Amount | Sales team |
2 | Dwight | 500 | |
3 | Jim | 425 | |
4 | Stanley | 475 | Values |
5 | Phyllis | 450 | |
6 | Andy | ||
7 |
FREE RESOURCE
Google Sheets Cheat Sheet
12 exclusive tips to make user-friendly sheets from today:
You'll get updates from me with an easy-to-find "unsubscribe" link.