Condition - Function COUNTIF

Page visited 21221 times

 
1. This function count how many times a data, a word, a figure, is present in a range of cells
Excel-Exercise-Tutorial-1
 
 
 
2. For instance, you want to make some statistics for your sells.
Excel-Exercise-Tutorial-2
 
 
 
3. You want to count how many times your have sold the item CD-Rom.

The problem is that you have not only the label CD-Rom in the column B.
Excel-Exercise-Tutorial-3
 
 
4. Activate the cell B15 and write the name of the function
Excel-Exercise-Tutorial-4
Formule de la cellule
=COUNTIF(
 
 
5. Select the range of cells where are all the labels
Excel-Exercise-Tutorial-5
Formule de la cellule
B3 :B12
 
 
6. Insert a semicolon to split your parameter and write your criteria
Excel-Exercise-Tutorial-6
Formule de la cellule
"CD-Rom"
 
 
7. The formula is :
Excel-Exercise-Tutorial-7
Formule de la cellule
=COUNTIF(B3:B12;"CD-Rom")
 
 
 
8. "We search in the column where there is all the data between the cell B3 and B12 how many times we have the word 'CD-Rom'".
Excel-Exercise-Tutorial-8
 
 
 
9. Note 1: si the criteria is a string or a condition, you must put your criteria between double quote
Excel-Exercise-Tutorial-9
 
 
10. Note 2: It is possible (and recommended) to have the reference a cell instead of a wording in the function
Excel-Exercise-Tutorial-10
Formule de la cellule
=COUNTIF(B3:B12;B3)
 
 
11. Now, with this formula, you want to count how many orders are below 80.
Excel-Exercise-Tutorial-11
Formule de la cellule
=COUNTIF(E3:E12;"<80")
 
 
 
12. "We search in the range of cells E3 : E12, how many cells have a value lower than 80 ".
Excel-Exercise-Tutorial-12
 
 
 
13. Try with the following exercise
Excel-Exercise-Tutorial-13