Count Numbers With Google Sheets' COUNT Function

Google Spreadsheets' COUNT function can be used to count worksheet cells containing number data.

These numbers can be:

  • Numbers listed as arguments in the function itself.
  • In cells within a selected range that contain numbers.

If a number is later added to a cell in the range that is blank or contains text, the count total is automatically updated.

Numbers in Google Spreadsheets

In addition to any rational number — such as 10, 11.547, -15, or 0 — there are other types of data that are stored as numbers in Google Spreadsheets and they will, therefore, be counted if included with the function's arguments.

This data includes:

The COUNT Function's Syntax and Arguments

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

The syntax for the COUNT function is:

= COUNT ( value_1, value_2, value_3, ... value_30 )

value_1 — (required) the numbers or values to be totaled.

value_2, value_3, ... value_30 — (optional) additional data values or cell references to be included in the count. The maximum number of entries allowed is 30.

COUNT Function Example

In the image above, the cell references to nine cells are included in the value argument for the COUNT function.

Seven different types of data and one blank cell make up the range to show the types of data that do and do not work with the COUNT function.

The steps below detail entering the COUNT function and its value argument located in cell A10.

Entering the COUNT Function

Google Spreadsheets does not use dialog boxes to enter a function's arguments as can be found in Excel. Instead, it has an auto-suggest box that pops up as the name of the function is typed into a cell.

  1. Enter the following into cells A1 through A8:

    • 11
    • 15
    • 33
    • 12/27/2015
    • 10:58:00 AM
    • SomeText Data
    • =AVERAGE(C1:C10)
    • FALSE
  2. Select cell A10 to make it the active cell — this is where the results of the COUNT function will be displayed.

    Screenshot of cell A10 selected in Google spreadsheet
  3. Type the equal sign (=) followed by the name of the function count.

    As you type, the auto-suggest box appears with the names and syntax of functions that begin with the letter C. When the name COUNT appears in the box, press the Enter key on the keyboard to enter the function name and open round bracket into cell A10.

    Screenshot of =COUNT in cell A10 in Google Sheets
  4. Highlight cells A1 to A8 to include them as the function's range argument.

    Screenshot of cells A1:A8 selected for function argument in Google Sheets
  5. Press the Enter key on the keyboard to enter a closing round bracket ()) and complete the function. The answer 5 should appear in cell A10 since only five of the nine cells in the range contain numbers.

    Screenshot of results of COUNT function in Google Sheets
  6. When you click on cell A10 the completed formula =COUNT(A1:A8) appears in the formula bar above the worksheet.

Why the Answer Is 5

The values in the first five cells (A1 to A5) are interpreted as number data by the function and result in the answer of 5 in cell A8.

These first five cells contain:

  • A number — cell A1.
  • The SUM function — cell A2.
  • An addition formula — cell A3.
  • A date — cell A4.
  • A time — cell A5.

The next three cells contain data that is not interpreted as number data by the COUNT function and is, therefore, ignored by the function.

  • Text data — cell A6.
  • A formula that generates the error value #DIV/0! cell A7.
  • The Boolean value FALSE — cell A8.

What Gets Counted

As mentioned above, Boolean values (TRUE or FALSE) are not always counted as numbers by the COUNT function. If a Boolean value is typed in as one of the function's arguments it is counted as a number.

If, as seen in cell A8 in the image above, however, the cell reference to the location of a Boolean value is entered as one of the value arguments, the Boolean value is not counted as a number by the function.

Therefore, the COUNT function counts:

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

It ignores empty cells and cell references to cells containing:

Was this page helpful?