# How to Count Number of Occurrences in Google Sheets

To count the number of occurrences of a specific value in Google Sheets, you can use the COUNTIF function. Here's how to do it:

- Open your Google Sheets document or create a new one.
- Identify the range of cells where you'd like to count the occurrences of a specific value. For example, let's say you want to count the number of times "apple" appears in the range A1:A10.
- Click on an empty cell where you'd like to display the result.
- Type the following formula, replacing "range" with the range of cells you'd like to search and "value" with the value you'd like to count:

`=COUNTIF(range, value)`

In our example, the formula would be:

`=COUNTIF(A1:A10, "apple")`

- Press Enter, and the number of occurrences will be displayed in the selected cell.

## Example

Let's say you have the following list of fruits in the range A1:A10:

```
A
1 apple
2 banana
3 apple
4 orange
5 apple
6 banana
7 orange
8 apple
9 banana
10 apple
```

To count the number of times "apple" appears in this list, you would use the following formula:

`=COUNTIF(A1:A10, "apple")`

Place this formula in an empty cell (e.g., B1) and press Enter. The result will be "5", as "apple" appears 5 times in the list.

Did you find this useful?