Excel COUNT Function

Count in Excel with the COUNT function and Counting Numbers shortcut

A Woman Looking at a Spreadsheet

Image Source / Getty Images

Excel's Count() function is one of a group of count functions that totals the number of cells in a selected range that contain a specific type of data.

Each member of this group does a slightly different job, and the Count() function's role is to count only numbers. It can do this two ways:

  1. It will total those cells within a selected range that contain numbers;
  2. It will total all of the numbers listed as arguments for the function. 

What Is a Number in Excel?

In addition to any rational number — such as 10, 11.547, -15, or 0 — other types of data are stored as numbers in Excel. The Count() function will count these as well if included with the function's arguments. This data includes:

If you add a number to a cell within the selected range, the function will be automatically updated to include this new data.

Counting Numbers Shortcut

Like most other Excel functions, you can enter Count() in several different ways. Usually, these options include:

  1. Typing the complete function into a worksheet cell.
  2. Selecting the function and its arguments using the COUNT function dialog box.

But because the Count() function is so well used, a third option — the Counting Numbers feature — has been included as well.

Counting Numbers is accessed from the Home tab of the ribbon and is located in the drop-down list linked to the AutoSum icon. It provides a shortcut method for entering the Count() function, and it works best when you want to count data located in a contiguous range, as shown in the image above.

What Gets Counted and Why

The Count() function parses some data as a number; otherwise, the function ignores the value. Data that is "counted" include numbers, the result of sums and additions, dates, times, and blank cells. Excel ignores some data, including text and numbers saved as a text value. The function cannot parse the results of invalid formulas, either.

Conditional formulas that return zeroes and ones to represent true and false will be counted. However, a pure boolean value like TRUE or FALSE is not included in the Count() formula

The COUNT Function's Syntax and Arguments

A function's syntax refers to the layout of the function and consists of the function's name, brackets, comma separators, and arguments.

The syntax for the COUNT function is:

The first argument, value1, is required; it includes the data values or cell references included in the count. The additional arguments, separated by commas, optionally specify additional data values or cell references to be included in the count. The maximum number of entries allowed is 255.

Each argument can contain:

  • Numbers or boolean values entered directly as one of the function's arguments
  • Individual cell references to the location of the data in the worksheet
  • A range of cell references
  • named range

Related Count Functions

In addition to Count(), Excel supports several complementary functions:

  • CountA(): Counts logical values, text, and error values.
  • CountIf(): Counts values if a condition is met.
  • CountIfS(): Counts the number of times that a stipulated criterion is met.
Was this page helpful?