How to Use the Count Function in Google Sheets (The Easy Way!)

There are many reasons why you might need to count values in a spreadsheet – inventory, payroll, accounting, and more. In these cases, finding the total number of occurrences or counting in specific ranges is often necessary. The Count function is our go-to function when it comes to doing this in Google Sheets.

Syntax of the Count Function in Google Sheets

The syntax of the Count function is as follows:

=COUNT(value1, [value2, ...])

Where:

  • =COUNT refers to the Google Sheets function for counting cells in a range, and
  • =value refers to the cells or ranges that our function needs to count.

This function will count each occurrence of a number. For example, if we type =COUNT(1,1,1,1,3,2), this function will return a count of 6 because there are 6 numbers in total.

Uses of the Count Syntax

In the parentheses, we can indicate several types of value formats, including:

  • Individual values separated by commas:

    =COUNT(1,4,3,7,2,12)
  • A range of values:

    =COUNT(A1:A123)
  • Multiple ranges of values separated by commas:

    =COUNT(B5:B22,C41:D65,A201:A245)
  • An entire column:

    =COUNT(B:B)

Using the Count Function in Google Sheets (Examples)

A. Using the Count Function to Count Numbers in a Single Column

Imagine you have a long list of articles, each with its own article code. It would be too time-consuming to count these values manually. The Count function is the perfect solution for this.

  1. Select an empty cell.
  2. In the selected cell, type =COUNT(.
  3. Select the range you want to count, then add the closing parenthesis ).

You can also count the entire column A by using =COUNT(A:A). In this case, our headers are non-numeric values, so they will not be counted. Remember that Count only works with numeric values.

B. Using the Count Function to Count Numbers in Different Sections

Sometimes, we will have more complex datasets that may be harder to count. Our example dataset below contains customer IDs spread across three columns. A simpler way to count them is by following these steps:

  1. Go to an empty cell.
  2. Enter =COUNT(range1, range2, range3...). Here, we can use =COUNT(A1:A22,D1:D22,G1:G15) or simply =COUNT(A:A,D:D,G:G).
  3. Press Enter.

This will now give us the total count of cells containing numbers in multiple columns, which is 59.

Other Variations of the Count Function

COUNTA

The COUNTA function follows a similar format and functionality as COUNT. However, this formula will count all cells that are not empty, whether they contain numbers, text, symbols, or even errors. Here’s how to use the COUNTA function in Google Sheets:

  1. Select an empty cell.
  2. Use the following formula: =COUNTA(range) or =COUNTA(A1:I22).
  3. Press Enter.

Using the same dataset as before, we can see that the output of COUNTA is 173, compared to the output of COUNT, which was 59.

COUNTBLANK

COUNTBLANK is the opposite of COUNTA and only counts cells that are empty. It follows the same format as the two counting methods discussed earlier.

In this example, we have cells with numbers, letters, and empty cells. Let’s use the three counting functions we’ve seen so far and compare the results:

  • COUNT: 132
  • COUNTA: 142
  • COUNTBLANK: 29

You can use these functions together or with other arithmetic functions to get exactly what you need.

COUNTUNIQUE

COUNTUNIQUE will only count the number of unique values in a dataset. Therefore, for a repeated number within the same dataset, it will only be counted once. If we were to use this for the set (1,1,2,3,1,5,1,2), it would return a count of 4, whereas the COUNT function would return a count of 8.

COUNTIF

COUNTIF uses the syntax =COUNTIF(criteria_range1, criteria1, [criteria_range2, criteria2], ...). This formula will only count the cells in a specified range that meet certain criteria. You can use it to count very specific items.

For example, if you have a large set of numbers in a spreadsheet and you only want to count values greater than 400, here’s the formula to use:

=COUNTIF(A1:E20, ">400")

And these are just a few of the different ways you can perform counts in Google Sheets. There are many other possibilities and combinations you can use to create an optimal spreadsheet for your needs.

If you enjoyed this article, you might also like our article on how to use the MEDIAN IF function in Google Sheets or our article on merging labels through mail merge in Google Sheets.

For more tips and tricks on Google Sheets, visit Crawlan.com.

Counting data in Google Sheets

Related posts