Functions in excel count

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less

The COUNT function counts the number of cells that contain numbers, and counts numbers within the list of arguments. Use the COUNT function to get the number of entries in a number field that is in a range or array of numbers. For example, you can enter the following formula to count the numbers in the range A1:A20: =COUNT(A1:A20). In this example, if five of the cells in the range contain numbers, the result is 5.

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

Syntax

COUNT(value1, [value2], …)

The COUNT function syntax has the following arguments:

  • value1    Required. The first item, cell reference, or range within which you want to count numbers.

  • value2, …    Optional. Up to 255 additional items, cell references, or ranges within which you want to count numbers.

Note: The arguments can contain or refer to a variety of different types of data, but only numbers are counted.

Remarks

  • Arguments that are numbers, dates, or a text representation of numbers (for example, a number enclosed in quotation marks, such as «1») are counted.

  • Logical values and text representations of numbers that you type directly into the list of arguments are counted.

  • Arguments that are error values or text that cannot be translated into numbers are not counted.

  • If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are not counted.

  • If you want to count logical values, text, or error values, use the COUNTA function.

  • If you want to count only numbers that meet certain criteria, use the COUNTIF function or the COUNTIFS function.

Example

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Data

12/8/08

19

22.24

TRUE

#DIV/0!

Formula

Description

Result

=COUNT(A2:A7)

Counts the number of cells that contain numbers in cells A2 through A7.

3

=COUNT(A5:A7)

Counts the number of cells that contain numbers in cells A5 through A7.

2

=COUNT(A2:A7,2)

Counts the number of cells that contain numbers in cells A2 through A7, and the value 2

4

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Usage notes 

The COUNT function returns the count of numeric values in the list of supplied arguments. COUNT takes multiple arguments in the form value1, value2, value3, etc. Arguments can be individual hardcoded values, cell references, or ranges up to a total of 255 arguments. All numbers are counted, including negative numbers, percentages, dates, times, fractions, and formulas that return numbers. Empty cells and text values are ignored.

Examples

The COUNT function counts numeric values and ignores text values:

=COUNT(1,2,3) // returns 3
=COUNT(1,"a","b") // returns 1
=COUNT("apple",100,125,150,"orange") // returns 3

Typically, the COUNT function is used on a range. For example, to count numeric values in the range A1:A10:

=COUNT(A1:A100) // count numbers in A1:A10

In the example shown, COUNT is set up to count numbers in the range B5:B15:

=COUNT(B5:B15) // returns 6

COUNT returns 6, since there are 6 numeric values in the range B5:B15. Text values and blank cells are ignored. Note that dates and times are numbers, and therefore included in the count.

The COUNTA function works like the COUNT function, but COUNTA includes numbers and text in the count.

Functions for counting

  • To count numbers only, use the COUNT function.
  • To count numbers and text, use the COUNTA function.
  • To count with one condition, use the COUNTIF function
  • To count with multiple conditions, use the COUNTIFS function.
  • To count empty cells, use the COUNTBLANK function.

Notes

  • COUNT can handle up to 255 arguments.
  • COUNT ignores the logical values TRUE and FALSE.
  • COUNT ignores text values and empty cells.

What Is COUNT In Excel?

The COUNT function in Excel counts the number of cells containing numerical values within the given range. It always returns an integer value.

The COUNT in Excel is an inbuilt statistical function, so we can insert the formula from the “Function Library” or enter it directly in the worksheet.

For example, to count a range of cells that contain a date before April 1, 2021, the formula used is “=COUNT(“Cell Range”, “<”&DATE (2021,4,1))”. The date is entered by using the DATE functionThe date function in excel is a date and time function representing the number provided as arguments in a date and time code. The result displayed is in date format, but the arguments are supplied as integers.read more.

Table of contents
  • What Is COUNT In Excel?
    • Syntax Of COUNT Excel Formula
    • How To Use COUNT Function In Excel?
    • Examples
    • The Characteristics Of The COUNT Function
    • Important Things To Note
    • Frequently Asked Questions (FAQs)
    • COUNT Function In Excel Video
    • Download Template
    • Recommended Articles
  • In a given dataset, the COUNT function in Excel returns the count of the numeric values.
  • It counts only the numbers and not the logical values, empty cells, text, or error values when the argument seems to be an array or reference.
  • The usage of the COUNT and VBA (VBA Excel COUNT) functions are the same in Excel.
  • The COUNTA function is a further extension of the COUNT function. It counts logical values, text, or error values. The  COUNTIF function (another extension of the COUNT function) counts the numbers that meet a specified criterion.

Syntax Of COUNT Excel Formula

The syntax of the COUNT Excel formula is,

COUNT Formula

The arguments of the COUNT Excel formula are,

  • value1, [value2], …, [value n]: It is a mandatory argument. It can range up to 255 values. The value can be a cell referenceCell reference in excel is referring the other cells to a cell to use its values or properties. For instance, if we have data in cell A2 and want to use that in cell A1, use =A2 in cell A1, and this will copy the A2 value in A1.read more or a range of values. It is a collection of worksheet cells containing a variety of data, out of which only the cells containing numbers are counted.

How To Use COUNT Function In Excel?

We can use the COUNT Excel function in 2 ways, namely:

  1. Access from the Excel ribbon.
  2. Enter in the worksheet manually.

Method #1 – Access from the Excel ribbon

Choose an empty cell for the result → select the “Formulas” tab → go to the “Function Library” group → click the “More Functions” option drop-down → click the “Statistical” option right arrow → select the “COUNT” function, as shown below.

COUNT Function in Excel - Access from the excel ribbon

The “Function Arguments” windowappears. Enter the arguments in the “Value1”, “Value2”, etc. fields, and click “OK”, as shown below.

COUNT Function in Excel - Function arguments window

Method #2 – Enter in the worksheet manually

  1. Select an empty cell for the output.
  2. Type =COUNT( in the selected cell. [Alternatively, type =C or =COU and double-click the COUNT function from the list of suggestions shown by Excel.
  3. Enter the argument as cell value or cell reference and close the brackets.
  4. Press the “Enter” key.

Basic Example – Count Numbers in the Given Range

Let us look at an example to apply the COUNT function to Count Numbers in the Given Range. (shown in the table below).

Select cell B10, enter the formula =COUNT(B3:B8), and press “Enter”.

COUNT Example 1

The output is shown above. The range B3:B8 contains only three numeric values. Hence, the COUNT function returns 3.

Examples

We will consider some scenarios using COUNT Function in Excel examples. Each example covers a different case, implemented using the COUNT function.

Example #1 – Count Non-empty Cells

Let us apply the COUNTA functionThe COUNTA function is an inbuilt statistical excel function that counts the number of non-blank cells (not empty) in a cell range or the cell reference. For example, cells A1 and A3 contain values but, cell A2 is empty. The formula “=COUNTA(A1,A2,A3)” returns 2.
read more
to the range of cells A1:A5 provided in the below table to find the count of the number of cells that are not empty.

Select cell B1, enter the formula =COUNTA(A1:A5), and press “Enter”.

The output is shown above. The COUNTA function counts the number of cells from A1 through A5 that contain some data. It returns the value as 4, as cells A1, A2, A3, and A4 are not empty, and only cell A5 is empty. 

Example #2 – Count the Number of Valid Dates

Let us apply the COUNT function to count the number of valid dates to the range of cells C3:C8 (shown in the table below).

Select cell C10, enter the formula =COUNT(C3:C8), and press “Enter”.

COUNT Example 3

The output is shown above. The range contains dates in different formats. Out of this, only two dates are valid. Hence, the formula returns 2.

Example #3 – Multiple Parameters

Let us apply the COUNT formula to the range of excel cells C3:C7 (provided in the table below) along with another parameter that is hard-coded with a value of 5.

Select cell C11, enter the formula =COUNTA(C3:C7,5), and press “Enter”.

COUNT Example 4

The output is shown above. The number of cells (C3 through C7) with valid numeric values or dates is 2, plus 1 for the number 5. Hence the COUNT formula returns the result as 3 (cells C5, C6, and the number 5). Note that the date in cell C7 is invalid, and so is not taken into account in the given results.

Example #4 – Invalid Numbers

Let us apply the COUNT formula to the range of values B6:B8 (shown in the table below) containing invalid numbers. 

Select cell B12, enter the formula =COUNTA(B6:B8), and press “Enter”.

COUNT Function Example 5

The output is shown above. The range does not have any valid number. Hence, the result returned by the formula is 0, indicated in cell B12.

Example #5 – Empty Range

Let us apply the COUNT function to the range of values in cells D3:D5, which is an empty range.

Select cell D10, enter the formula =COUNTA(D3:D5), and press “Enter”.

COUNT Function Example 6

The output is shown above. The given range does not have any numbers, and it is empty. Hence, the result returned by the formula is 0, indicated in cell D10.

The Characteristics Of The COUNT Function

The features of the COUNT Excel function are listed as follows:

  1. It counts the list of parameters containing the logical values and text representations.
  2. It does not count the error values or text which cannot be converted into numbers.
  3. It counts only the numbers and not the logical values, empty cells, text, or error values when the argument seems to be an array or reference.
  4. A further extension to the COUNT function is the COUNTA function. It counts logical values, text, or error values.
  5. Another extension of the COUNT function is the COUNTIF function, which counts the numbers that meet a specified criterion.

Important Things To Note

  • Since the COUNT function has other related functions such as COUNTA, COUNTIF, COUNTBLANK, etc., we must ensure we enter the right function name to avoid getting a “#NAME?” error.
  • In a selected cell range, the function ignores the blank cells, non-numeric cells, etc.

Frequently Asked Questions (FAQs)

1. How to use the Excel COUNT function?

The COUNT function provides the count of cells containing numbers within the given range of cells. It also counts numeric values within the list of arguments.
The formula of the COUNT in excel is =COUNT(value 1, [value 2],……, and so on).

2. What is the COUNTIF formula?

The COUNTIF function counts cells in a range that meets a single criterion. It counts cells that contain dates, numbers, and text.
The COUNTIF formula in excel is =COUNTIF(range, condition)
Here, the range is a series of cells to count.

3. What is the difference between the COUNT and COUNTA functions in Excel?

The COUNT function is generally used to count a range of cells containing numbers or dates. It excludes blank cells. And the COUNTA function, whichstands for count all, will count the numbers, dates, text, or a range containing a mixture of all these items. It does not count blank cells.

COUNT Function In Excel Video

Download Template

This article must help understand the COUNT function in Excel with its formulas and examples. You can download the template here to use it instantly.

You can download this COUNT Formula Excel Template here – COUNT Formula Excel Template

Recommended Articles

This is a guide to the COUNT Function in Excel. Here, we count number of cells with numeric values, COUNTA, COUNTIF, examples & a downloadable template. You may also look at the below useful functions in Excel –

  • Example of COUNTIF with Multiple Criteria
  • INT Function in Excel (Integer)INT or integer function in excel returns the nearest integer of a given number and is used when we have many data sets and each data in a different format.read more
  • AVERAGE Function in Excel

На чтение 1 мин

Функция СЧЁТ (COUNT) в Excel используется для подсчета ячеек с числовыми значениями.

Содержание

  1. Что возвращает функция
  2. Синтаксис
  3. Аргументы функции
  4. Дополнительная информация
  5. Примеры использования функции СЧЕТ в Excel

Что возвращает функция

Возвращает значение количества ячеек с числами.

Telegram Logo Больше лайфхаков в нашем Telegram Подписаться

Синтаксис

=COUNT(value1, [value2], …) — английская версия

=СЧЁТ(значение1;[значение2];…) — русская версия

Аргументы функции

  • value1 (значение1) — ссылка на ячейку или диапазон, в котором вы хотите посчитать количество чисел;
  • [value2],…([значение2]) — (необязательный аргумент) до 255 дополнительных ячеек со значениями, по которым вы хотите посчитать количество чисел.

Дополнительная информация

  • Функция считает только ячейки с числовыми значениями (1,2,3…и.т.д.);
  • Значения даты или текст в виде чисел в кавычках (например единица в кавычках — «1») учитываются функцией;
  • Логические значения в ячейках не подсчитываются;
  • Ячейки с ошибками и текстом не участвуют в подсчете;
  • Пустые ячейки, логические значения, текст или ячейки с ошибками в массиве или ссылке не учитываются.

Примеры использования функции СЧЕТ в Excel

функция count (счет) в excel

This tutorial is all about counting different values/contents in a cell in Microsoft Excel. we will learn in-depth about different count functions in Excel such as COUNT, COUNTA, COUNTBLANK, COUNTIF, and COUNTIFS.

Steps to Use the Count Functions in Excel

Let’s get started with this simple and easy guide to using the count functions to count values in cells in Excel, step-by-step.

1. Counting numeric and textual data in Excel

To count the number of numeric and textual data within cells, use the COUNTA formula by following the steps below.

Let us take a dataset with some textual and numeric data in its rows.

Count Functions in Excel
  • Type =COUNTA( in a blank cell.
  • Select the cells containing textual and numeric data.
  • Close the parenthesis and press ENTER.
Count Functions in Excel

Notice that we have excluded Particulars from the selection as it is a heading.

You can see that the COUNTA function has now counted the number of cells with textual and numeric data for you. It depicts we have 4 cells with some text and numeric data in them, which is true in this case.

counta counted

2. Count functions for numeric data only

To count the number of numeric data within cells, use the COUNT functions by following the steps.

Let us take a dataset with some numeric data in its rows.

num data
  • Type =COUNT( in a blank cell.
  • Select the cells containing numeric data.
  • Close the parenthesis and press ENTER.
count

You can see that the COUNT formula has now calculated the number of cells with only numeric data in them and has not calculated the blank cells in the selection. It shows the number 3 meaning there are three cells with only numeric data in them.

count counted

3. Counting blank cells in Excel

To count the number of blank cells, use the COUNTBLANK formula by following the steps.

Let us take a dataset with some numeric data and a blank cell in its rows.

blank data 1
  • Type =COUNTBLANK( in a blank cell.
  • Select the cells you want to calculate blank cells for.
  • Close the parenthesis and press ENTER.
countblank

You can see that the COUNTBLANK formula has now calculated the number of blank cells within the selected range. It shows the number 2 meaning there are two blank cells within the selected range.

countblank counted

Using the COUNTIF formula in Excel

The COUNTIF formula in Excel can be used to count the number of custom values that you prefer within a selected range. Let’s learn how.

We will take an example of an attendance sheet below to learn to use this formula.

attendance sheet
  • In this sheet, “P” denotes present and “A” denotes absent for a student.
  • The goal is to calculate the total number of Ps and the number of As for every student in the sheet to determine the total number of days present and total number of days absent.
  • This can be achieved with the help of the COUNTIF formula in Excel. Let’s begin using the formula in the next steps.
  • Type =COUNTIF( under the Present column.
  • Select the ranges marked with P and A for the first student only.
  • Put a comma to move to the Criteria argument.
  • Type “P” and close brackets.
countif
  • Press ENTER to apply the formula.
  • Repeat the same under the Absent column of the first student by replacing the criteria with “A”.
countif counted

You can see that the COUNTIF formula has been applied for the first student correctly. We can say that the student was present on 10 days and absent for 5 days on a total of 15 working days.

  • To calculate the number of present and absent days for other students, simply double-click the bottom right corner of the first cell until the cursor turns into a black plus sign to auto-fill the same formula to adjacent cells.

Recommended read: How to Use AutoFill in Excel?

autofill countif

You can see that all the cells of all students have been automatically filled.

Using the COUNTIFS formula in Excel

The COUNTIFS formula in Excel is more specific in nature and can be used to count the number of custom values that you prefer by providing multiple criteria within a selected range.

For example, you can specifically find out the total number of boys or girls in a class who secured higher than 70% in their examinations.

Let’s put this example into practice by applying the COUNTIFS formula. We take a sample mark list of students along with their genders in a column.

countifs sample data

Now, let us begin sorting all girls who scored above 60% by following the steps below.

  • Type =COUNTIFS( in a blank cell.
  • Select the Girl/Boy range in the dataset when asked for Criteria_range1.
  • Put a comma to move to the Criteria1 argument.
  •  Select a cell named Girl in that range.
  • Put a comma and move to the Criteria_range2 argument.
  • Select the Percentage column range in this argument.
  • Put a comma and type “>60”.
  • Close the brackets and hit ENTER on your keyboard.

This is how your formula should look like before pressing ENTER.

countifs
  • Once you’ve pressed ENTER, you should then see the number 3 which simply denotes that there 3 girls in the range who have scored above 60% in examinations.
  • Repeat the same steps by selecting a cell named Boy at the Criteria1 argument to find out the number of boys who have scored above 60% in exams.
countifs calculated

Conclusion

This was all about counting in Excel and the multiple count functions in the application that can be used to count various types of data or values. If you have any doubts regarding these COUNT functions, let us know in the comments below and we will surely help you out!

References: Microsoft

Понравилась статья? Поделить с друзьями:
  • Functions graph in excel
  • Full of food word
  • Functions are performed by word stress
  • Full of energy in one word
  • Full metal jacket bird is the word