CountIF Formula
This function counts
the number of items which match criteria set by the user.
|
Item
|
Date
|
Cost
|
|
|
|
Brakes
|
1-Jan-98
|
80
|
|
|
|
Tyres
|
10-May-98
|
25
|
|
|
|
Brakes
|
1-Feb-98
|
80
|
|
|
|
Service
|
1-Mar-98
|
150
|
|
|
|
Service
|
5-Jan-98
|
300
|
|
|
|
Window
|
1-Jun-98
|
50
|
|
|
|
Tyres
|
1-Apr-98
|
200
|
|
|
|
Tyres
|
1-Mar-98
|
100
|
|
|
|
Clutch
|
1-May-98
|
250
|
|
|
|
|
|
|
|
|
How many
Brake Shoes Have been bought.
|
2
|
=COUNTIF(C4:C12,"Brakes")
|
|||
How many
Tyres have been bought.
|
|
3
|
=COUNTIF(C4:C12,"Tyres")
|
||
How many
items cost £100 or above.
|
|
5
|
=COUNTIF(E4:E12,">=100")
|
||
|
|
|
|
|
|
Type the
name of the item to count.
|
service
|
2
|
=COUNTIF(C4:C12,E18)
|
||
|
|
|
|
|
|
|
|
|
|
|
|
What Does It Do ?
|
|
|
|
|
|
This
function counts the number of items which match criteria set by the user.
|
|||||
|
|
|
|
|
|
Syntax
|
|
|
|
|
|
=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(A1:A5,100)
|
|||||
To match
a piece of text type the text in quotes, such as =COUNTIF(A1:A5,"Hello")
|
|||||
To match using
operators surround the expression with quotes, such as =COUNTIF(A1:A5,">100")
|
|||||
|
|
|
|
|
|
Formatting
|
|
|
|
|
|
No
special formatting is needed.
|
|
|
|