# How (and When) to Use the Count Function in Excel

The COUNT function in Excel is useful when you want to count cells in a range (or multiple ranges) that contain numeric values without any real regard to the actual numbers contained in the cells.

Let’s see how the COUNT function in Excel works in the following example of stock investors.

In our example, we can see each investor along with how many shares of each stock he or she owns. Let’s assume we want to find out how many of our investors own Apple stock. We don’t necessarily care how many shares of stock they own. As long as they own at least one share of stock, we want to include them in our total.

To do this we can use the COUNT function in Excel. Our COUNT function should include the range of cells for Apple’s stock. In our example, that range would be C3:C7 so our COUNT function in cell C9 would look something like this:

=COUNT(C3:C7)

The result is that three of our investors own Apple stock. Again, remember we don’t care how many shares of Apple stock they own. We only care that they own at least one share of Apple stock.

## COUNT function with multiple ranges

If you want to include more than one range in your COUNT function in Excel, you need only separate each range by a comma as if they were separate parameters.

In our stock example, we could use this to see how many of our investors own either Apple or Microsoft stock using the following COUNT function in cell D9:

=COUNT(C3:C7,D3:D7)

Keep in mind that using the COUNT function in this manner does not return unique investors. If one of our investors owned both Apple and Microsoft stock, he or she would be counted twice.

Check out our Excel Lesson Videos to learn how to use more common Excel functions.

## Include a manual count

Let’s do one more example of the COUNT function in Excel. In this example, we will count the number of investors in our spreadsheet who own Google stock. However, we’ll also pretend that we know of two other investors who need to be counted but who are not listed in our spreadsheet. In this case, we can just include the number “1” as an additional parameter in our COUNT function for each investor we need to manually count. Our new COUNT function in cell E9 looks like this:

=COUNT(E3:E7,1,1)

Now you know three different ways to use the COUNT function in Excel. Remember, use the COUNT function when you want to count cells with numeric values with no regard to what the number in the cell is.