Count how often a value occurs
To count how often a specific value occurs in Excel, you can use the COUNTIF function. It’s designed exactly for this!
✅ COUNTIF Function
Syntax:
=COUNTIF(range, criteria)
- range: The cells you want to check.
- criteria: The value or condition you’re counting.
🔹 Example: Count How Many Times “Apple” Occurs in A1:A10
=COUNTIF(A1:A10, "Apple")
This counts the number of cells in A1:A10 that exactly contain the word “Apple”.
🔹 Example: Count How Many Times a Number Appears (e.g., 5)
=COUNTIF(B1:B20, 5)
Counts the cells with the number 5 in range B1:B20.
🔹 Example: Using a Cell Reference for Criteria
If you want to count how often the value in cell D1 occurs in A1:A10:
=COUNTIF(A1:A10, D1)
🔹 Count with Conditions (e.g., greater than 10)
=COUNTIF(A1:A10, ">10")
Counts cells with values greater than 10.