We use COUNT, COUNTA, and COUNTIF functions to quickly analyse and summarise data without manually checking each cell.
These functions help you to:
- Analyse results
- Create summaries
Examples:
- Counting the number of test scores entered
- Counting all non-empty cells
- Counting cells which meet a condition
Counting Cells Containing Numbers
The COUNT function will count the number of cells containing a number. It does not add the values (use the SUM function to do that).
Try this…
The spreadsheet contains several cells containing different types of data.
- Click: C11
- Type: =COUNT(
- Select cells A2 to C9
- Type: ) and press enter.
The returned value should be 14.
Counting Non-empty Cells
The COUNTA function counts the number of cells which contain data.
- Click: C13
- Type: =COUNTA(
- Select cells A2 to C9
- Type: ) and press enter.
The returned value should be 22.
Change some of the values in the table to see how they affect the results of COUNT and COUNTA.
Count Cells that meet a Condition
COUNTIF is used to count cells which meet a specified condition. The syntax is:
=COUNTIF(range, criteria)
- range is the cells to count
- criteria is the criteria we want to count
Let's count the cells which contain "Cake":
- Click: C15
- Type: =COUNTIF(
- Select cells A2 to C9
- Type: , "Cake") and press enter (don't forget the comma!)
Now let's count the cells which contain a value greater than 10:
- Click: C17
- Type: =COUNTIF(
- Select cells A2 to C9
- Type: , ">10") and press enter (don't forget the comma!)