In MS Excel, the COUNT()
function counts the number of numeric values in the list of inputs and the number of cells containing numbers. It can also be used to get the entries in a number field inside a range or array of numbers.
The basic syntax for the COUNT()
function is given below:
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: Ranges or cell references may be used instead of explicit values.
Following are the basic examples to demonstrate three ways of using the COUNT()
function:
If we simply want to see how many values we have added in our COUNT()
function, we can use the below formula:
If we want to use the COUNT()
function by providing the list of cells, we can use the formula below:
If we want to use the COUNT()
function by providing the range of cells, we can use the formula below:
The following is a step-by-step guide to using the COUNT()
function:
Select the cell: We click the cell where we want the count to appear.
Use the COUNT()
function: We will 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:
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 look at both of them:
COUNT()
function with list of cellsLet’s 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), we write the following in the cell:
Let’s visualize the steps above in action.
Note: As you 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 the COUNT()
function it displays 7 that means there is one product that is remain unsold.
COUNT()
function by specifying the rangeFirst 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:
Let's visualize the above steps 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: MS Excel essentials series, all in one place!
To deepen your understanding of MS Excel, explore our series of Answers below:
How to create MS Excel files using Python
Learn how to generate and manipulate Excel files using Python libraries like openpyxl
and pandas
.
How to create MS Excel files using Julia
Discover how to create and modify Excel files using Julia with packages like XLSX.jl
for data analysis.
Common aggregate functions in MS Excel
Explore key aggregate functions like SUM, AVERAGE, MAX, and MIN to perform data calculations efficiently.
How to count values in MS Excel
Learn to count cells, numbers, and specific values using functions like COUNT
, COUNTA
, and COUNTIF
.
How to calculate sum in MS Excel
Use the SUM
function to add numbers across rows, columns, and custom ranges.
How to calculate average in MS Excel
Apply the AVERAGE
function to find the mean of a dataset quickly.
How to calculate maximum in MS Excel
Learn how to use the MAX
function to find the highest value in a range.
How to calculate the product in MS Excel
Use the PRODUCT
function to multiply values in a selected range.
How to calculate the median in MS Excel
Understand how the MEDIAN
function determines the middle value in a dataset.
How to calculate minimum in MS Excel
Use the MIN
function to identify the smallest value within a range.
How to calculate the mode in MS Excel
Find the most frequently occurring value using the MODE
function.
Calculate student grades from percentage in MS Excel
Learn how to automate grade calculation using conditional formulas like IF
, LOOKUP
, and VLOOKUP
.
Free Resources