3. COUNTIF
3. COUNTIF
Forumla Working
This function counts the number of items which match criteria set by the user.
Formula Structure
=COUNTIF(RangeOfThingsToBeCounted, CriteriaToBeMatched)
The criteria can be typed in any of the following ways:
To match a specific number type the number, such as =COUNTIF(E16:E24, 100) Ans: 1
To match a piece of text type the text in quotes, such as =COUNTIF(C16:C24, "Tyres") Ans: 3
To match using operators surround the expression with quotes, such as =COUNTIF(E16:E24, ">100") Ans: 4
Example 1
Fruits Quantity
Apples 32
Oranges 55
Peaches 75
Apples 86
Formula Tasks
=COUNTIF(B36:B39,"Apples") Count Number of Apples in Fruit list, using "Text" in criteria
=COUNTIF(B36:B39,B38) Count Number of Peaches in Fruit List, using Cell reference as
criteria
Count Number of Oranges and Apples in Fruit list
=COUNTIF(B36:B39,B37)+COUNTIF(B36:B39,B3
=COUNTIF(C36:C39,">55")
6)
Count Number of Values greater than 55 in Quantity List
t by the user.
=COUNTIF(C16:C24,"Brakes")
=COUNTIF(C16:C24,"Tyres") Criteria = Text or Number
=COUNTIF(E16:E24,">=100")
Tasks
Using COUNTIF formula to calculate below tasks:
2. Count # of cases where "BAC" & "SRB" Products sold quantity > 50 3
3. Count # of cases where "BAC" & "SRB" Products sold quantity >= 80 2