I am a supporter of St. Joseph's hospice. If you find this site useful or if it helped you, consider a small donation to St. Joseph's, please.
"Nagging is the repetition of unpalatable truths." [Edith Clara Summerskill]

Countif is a nice function as long as you need to apply only one criterion.
If you want to count how often the value 5 appears in a data set, for example, you can use
=COUNTIF(Dataset,=5)
Please see the example shown on the left.
Other examples about Countif you can find at COUNTIF and at Largest Remainder.

But as soon as you face two or more conditions which you want to apply with logical AND's or OR's, you are in trouble with COUNTIF.
SUMPRODUCT is your solution here.
Please note that I suggest NOT to take SUMPRODUCT as a holy grail. I use this example just as an evolutionary argument. Please read additional material on SUMPRODUCT here.
[Sulprobil] [Get it done] [Organisation] [IT] [Controlling] [Human Resources] [Family] [Contact] [Download] [Disclaimer]