COUNT Function
- 03:58
Understand how to apply the count function
Downloads
Transcript
The count function counts, numbers, or more specifically, it counts the number of cells containing numbers. Importantly, it does not sum them, it just counts the number of cells there are. Values that can be supplied, can be hard codes, cell references or ranges. Things that aren't counted here include cells with text in them, cells with zeros, errors, true or false, or empty cells. So let's think about its uses. Well, the uses include counting non blank cells. Count the number of years, count the number of staff, count the number of sales, maybe let's have a look at the formula. You start by typing in equals count, open brackets, and then you have to include some cell references such as value one here. You've then got an optional value, two, value three, value four, et cetera. Typically we'd include a number of cells. Let's have a look at an example in Excel.
Here we have some transactions in column C. Each of these transactions has a unique identifier, i,e. a code to show us that a transaction took place. We're going to go down to the bottom of this list and write a account function to work out how many transactions took place in March.
So I type equals, count, open brackets, and then I need to select the cells. I want to count. I could do this with my mouse by clicking into C5 and dragging down to C15. Close brackets, press enter and we can see that 11 transactions took place in March.
Let's do the same thing in column E. In column E, we are looking at the number of dates that are here. I'm gonna use my keyboard instead of my mouse to select the cells I want. So equals count, open brackets, and then I use my arrow keys with shift to select the cells close and press enter. And I see there were 11 dates. Remember, the count function only counts numbers in cells, but luckily dates are just a formatted version of a number.
But if I try do a count function on column D that has text in it, i e the names, Let's see what happens equals count, select the cells you wanna count. So from D5 down to D15, close brackets and enter. And you can see I get zero. That is because the count function does not count cells with text in them.
So we found 11 transactions happened in March. Let's scroll down and work out how many transactions happened in April 11. Transactions also happened in April and in May if we do the same thing, we can see that there were nine transactions. So useful for comparison.