Counts the number of cells that contain numbers and numbers within the list of arguments. Use COUNT to get the number of entries in a number field in a range or array of numbers.
Syntax
COUNT(value1,value2, ...)
Value1, value2, ... are 1 to 30 arguments that can contain or refer to a variety of different types of data, but only numbers are counted.
Remarks
Example
The example may be easier to understand if you copy it to a blank spreadsheet.
How?
- Create a blank spreadsheet.
- Select the example in the Help topic.
![]()
Selecting an example from Help
- Press CTRL+C.
- In the spreadsheet, select cell A1, and press CTRL+V.
- To switch between viewing the formula that returns the result and the result in the cell, select the cell and press F2 and then ENTER, or click Commands and Options on the spreadsheet toolbar, click the Formula tab, and look in the Formula in active cell (active cell) box.
Data | |
---|---|
Sales | |
12/8/2008 | |
19 | |
22.24 | |
TRUE | |
#DIV/0! | |
Formula | Description (Result) |
=COUNT(A2:A8) | Counts the number of cells that contain numbers in the list above (3) |
=COUNT(A5:A8) | Counts the number of cells that contain numbers in the last 4 rows of the list (2) |
=COUNT(A2:A8,2) | Counts the number of cells that contain numbers in the list, and the value 2 (4) |