COUNTIF in Apple Numbers
COUNTIF(test-range, condition)Explanation
COUNTIF counts the cells that meet one condition. Put the condition in quotation marks, for example ">5".
When do you use COUNTIF?
Use COUNTIF to count how many cells meet a single condition, such as the number of products above a certain price.
Syntax
COUNTIF(test-range, condition)Example
Count how many products have a price higher than 5.
| A | B | C | |
|---|---|---|---|
| 1 | Product | Price | Qty |
| 2 | Apple | 4 | 10 |
| 3 | Pear | 6 | 5 |
| 4 | Kiwi | 12 | 2 |
| 5 | Grape | 8 | 3 |
Formula: =COUNTIF(B2:B5,">5")
Result: 3
Another example
Count the products with a price below 8.
Formula: =COUNTIF(B2:B5,"<8")
Result: 2
Watch out
The condition goes between quotation marks, including the comparison sign, for example ">5".
Frequently asked questions
What does COUNTIF do in Apple Numbers?
COUNTIF counts the cells that meet one condition. Put the condition in quotation marks, for example ">5".
What is the syntax of COUNTIF?
The syntax is COUNTIF(test-range, condition).
Can COUNTIF handle several conditions?
COUNTIF tests one condition. For several conditions use COUNTIFS.
Does COUNTIF count text too?
Yes, you can test text as well, for example COUNTIF(A2:A5, "Kiwi").
More in this category
Read more
Practise it yourself
Type the formula yourself in a real exercise and see right away if your answer is correct. The first exercises are free.
Start practising