From the Not Just Numbers blog:
Before we get into this week’s post I’d just like to comment on how popular Mynda Treacy’s Excel Dashboards course proved with readers. Unfortunately, registration for the course is now finished. Given its success, I will certainly be making it available to readers next time Mynda runs the course – just make sure that you are subscribed to the blog so that I can keep you posted.
In the meantime, you might want to take a look at Mynda’s Excel Expert course which is of the same high standard.
OK, on with today’s post…
I have covered COUNTIF in a previous post, but today I want to look at three much simpler functions that do a similar task in specific circumstances.
All of the functions have one argument, the range they are to apply to, i.e.
NB: there can be multiple arguments, e.g.
or even a list of numbers, although this has less practical use.
So, let’s look at each one in turn:
This function returns the number of cells that contain numbers within the range or ranges. This does include zeroes. and the results of formulae.
This function returns the number of cells that are not empty within the range or ranges. This does mean anything, including a formula that returns null.
This is essentially the reverse of COUNTA, i.e. it returns the number of empty cells. Again, a formula will not be a blank, irrespective of its result.
If we apply each of the functions to the range A1:B5 above, we get the following:
=COUNT(A1:B5), returns 4, as the range contains 4 numbers
=COUNTA(A1:B5), returns 8, as there are 8 non-empty cells
=COUNTBLANK(A1:B5), returns 2, as there are 2 blank cells
Not as flexible as COUNTIF but, I’m sure you will agree, much simpler for these specific scenarios.
If you enjoyed this post, go to the top of the blog, where you can subscribe for regular updates and get your free report “The 5 Excel features that you NEED to know”.