Sometimes, you want to know how many items in a list meet certain criteria. As usual, Excel has a function (or two) to help.
If you simply want to count items in one column (the same column that you want to apply the criteria to), you can use the COUNTIF function.
The syntax is as follows:
So, for example, if you had a list of sales and column A contained the sales region, you could count how many sales were in the North region, by using:
This assumes an "equals" criteria, but you can use other operators. Say that column B contained the value of the sale, then you could return how many sales exceed £5,000, by using:
But what if you want to return how many sales exceeded £5,000 in the "North" region?
Here, you can use a more recent Excel function that allows you to apply multiple criteria, COUNTIFS. This works just like COUNTIFS but allows as many pairs of Range and Criteria as you want, so:
would provide our answer.
And that's it!
If you enjoyed this post, go to the top of the blog, where you can subscribe for regular updates and get two freebies "The 5 Excel features that you NEED to know" and "30 Chants for Better Charts".