In Google Sheets, the COUNT
function counts the number of numeric values in the list of inputs and the number of cells containing numbers. Use the COUNT
function to get the number of entries in a number field that are inside a range or array of numbers.
The basic syntax for the COUNT
function is:
=COUNT(value1, value2, ...)
Here, value1
and value2
represents the cell number or any numeric value. It’s worth noting that we have the flexibility to include additional cells as needed.
Note: Instead of using explicit values, we can also use ranges or cell references.
Following are the basic examples of using COUNT
:
If we simply want to see how many values we have added in our COUNT
function, we can use the formula below:
=COUNT(10,20,30)
If we want to COUNT
by providing the list of cells, we can use the formula below:
=COUNT(A1,A2,A3)
If we want to COUNT
by providing the range of cells, we can use the formula below:
=COUNT(A1:A3)
The following is a step-by-step guide to using the COUNT
function:
Select the cell: We click on the cell where we want the count to appear.
Use the COUNT
function: We type =COUNT(
into the selected cell.
Select the range: If we want to count the number of cells in the range A1 to A5, there are two ways to achieve the desired result:
We can enter “A1:A5” after the opening parenthesis and then close the parenthesis and press “Enter.” The formula should look something like this: =COUNT(A1:A5)
.
We can also enter “A1,A2,A3,A4,A5” after the opening parenthesis and then close the parenthesis and press “Enter.” The formula should look something like this: =COUNT(A1,A2,A3,A4,A5)
.
Let’s now apply the steps above on our dataset. Let’s suppose we have the following dataset, and our objective is to determine the number of products that result in a sale.
Now, our objective is to determine the number of products that result in a sale. We intend to examine whether any of the products remain unsold. There are two ways to find the count. Let’s use both:
First we select the cell, where we need to count the numbers of cells that consist of any numeric values. Let's suppose here the cell number is B12. After we select the “cell(B12),” write the following in the cell:
=COUNT(B2,B3,B4,B5,B6,B7,B8,B9)
Let's visualize the steps above in action.
Note: As we can see in the slides above, when multiple cells are added, the system automatically highlights the cell number and alters its color for easier identification.
If an empty cell is included in a count formula and subsequently populated with a value, the total in cell B12, where the count is calculated, will automatically update to reflect the new value.
In the slides above, the total number of products are 8, but when we use count it displays 7 that means there is one product that is remain unsold.
First we select the cell, where we need to count the numbers of cells that consist of any numeric values. Let’s suppose here the cell number is B12. After we select the “cell(B12),” write the following in the cell:
=COUNT(B2:B9)
Let's visualize the steps above in action.
Arguments consisting of numbers, dates, or textual representations of numbers (such as “1” or other numbers surrounded by quotation marks) are counted.
Unlock your potential: Google Sheets fundamentals series, all in one place!
To deepen your understanding of Google Sheets, explore our series of Answers below:
Common aggregate functions in Google Sheets
Learn about essential aggregate functions like SUM, AVERAGE, MIN, MAX, COUNT, and more for efficient data analysis.
How to calculate the minimum in Google Sheets
Discover how to find the smallest value in a dataset using the MIN
function.
How to calculate the median in Google Sheets
Learn how to determine the middle value of a dataset using the MEDIAN
function.
How to calculate the maximum in Google Sheets
Explore how to identify the largest value in a dataset using the MAX
function.
How to calculate the average in Google Sheets
Understand how to compute the mean of a dataset using the AVERAGE
function.
How to calculate student grades from percentages in Google Sheets
Learn how to use formulas and conditional formatting to convert percentages into letter grades.
How to count values in Google Sheets
Discover how to count the number of values in a range using functions like COUNT
, COUNTA
, and COUNTIF
.
How to calculate the sum in Google Sheets
Explore how to add up values in a dataset using the SUM
function.
How to calculate the mode in Google Sheets
Learn how to find the most frequently occurring value in a dataset using the MODE
function.
How to calculate the product in Google Sheets
Understand how to multiply values in a dataset using the PRODUCT
function.
Free Resources