The function COUNTIF requires only two parameters
- the range of cells where is your data
- the value you search.
For instance, you can use the cell B3 where its value is CD-Rom
It is imperative that the value you look for is always the same. In this example, the second word "CD-Rom" begins with a space (so it's not exactly the same word). This is why, in this example, the formula returns only 3 times the word "CD-Rom".
On the other hand, the COUNTIF function ignores sensitive case
Practice the exercise below by writing the formula in B15 to find the number of Post-it present in column B (enter your formula directly into the following spreadsheet)
Greater than / smaller than
If you want to count the number of elements larger (or smaller) than a certain value, just as the second parameter to write a logical test (such as> 100,> = 100, <50, ...) . For all logical tests, see the page Function IF.
As you can see, the test is between double-quote like a text. Why ?
Well, even if previously we don't put any symbol in our formula, you can also write your formula with the symbol =. For instance you can write the first formula like this and it works !
So, for any test in a function COUNTIF, you write it between double-quote.