Excel - COUNT Function



COUNT Function

Various counting functions in Excel are COUNT, COUNTBLANK, COUNTIF, COUNTIFS, etc. The Excel COUNT Function counts the field values comprised of numbers only. This function works seamlessly with Numeric values, Dates, and Times but not with error values, text strings, and missing values.

For example, employ the COUNT function to count the invoices in a vendor dataset. Moreover, the COUNTIF function can be used when counting field values depending on the constraint. You can also identify missing values using the variation of the COUNT function, that is, the COUNTIF function when merging with the IF function.

Compatibility

This advanced Excel function is compatible with the following versions of MS Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the COUNT function is as follows −

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

Arguments

You can use the following arguments with the COUNT function −

Argument Description Required / Optional
value1 The first item, cell reference, or range within which you want to count numbers. Required
value2, ... Up to 255 additional items, cell references, or ranges within which you want to count numbers. Optional

Points to Remember

  • The COUNT function enumerates the hidden cells and numbers only. Apart from this, the text, error values, Boolean values(Yes/No), and blank cells are not countable. For instance: =COUNT({"Delhi","USA","Yes","No","Yes"}). The COUNT function would return the zero as non-numeric values are defined in the array.
  • Utilize the COUNTA function while counting the text, error-prone field, and Boolean values.
  • Additionally, utilize the COUNTIF and COUNTIFS functions when counting the integer values based on specific criteria.

How to Use COUNT() Function in Excel?

Step-by-step instructions are depicted below −

Step 1 − Open a desired Excel worksheet.

Step 2 − Select a designated cell, type =COUNT function, and start the bracket (

Step 3 − Now, specify the range of cells like A2:A9 and then the enclosed bracket ).

Step 4 − Press the Enter tab to compute the COUNT function.

Examples of COUNT Function in Excel

Practice the following examples to get the master proficiency in the COUNT function in Excel.

Example 1: What does the COUNT Function do in Excel?

In this example, the COUNT function is applied to calculate the number of entries in the specified range of cells.

Solution

Step 1 − Assume the sample dataset where a mixed set of data values are defined in the B3: D16 cells.

COUNT Function in Excel

Step 2 − After that, select the cell range D3:D13 and write the formula =COUNT(A3:C3) in the formula bar.

COUNT Function in Excel 1

Step 3 − Furthermore, press the Ctrl+Enter tab to count the numbers only

COUNT Function in Excel 2

Example 2

In this example, the text and empty values are written in the cell range upon which we will apply the Excel COUNT function.

Solution

Step 1 − First, consider the sample data values depicted in the cell range B3:B10. Double-click on the C3 cell and write the formula =COUNT(B3:B10).

COUNT Function in Excel 3

And then hit Enter. Therefore, the COUNT function returns 0 as it will not work for letters and blank values.

COUNT Function in Excel 4

Download Practice Sheet

You can download and use the sample data sheet to practice the COUNT function.

Advertisements