COUNT()

Syntax. COUNT(value1,value2,...)

Definition. This function calculates how many numbers are included in an argument list. The COUNT() function calculates the number of entries in a number field that is in a range or array of numbers.

Arguments

Background. The COUNT() function performs a simple task but can save a lot of time. Especially for tables containing a large number of values, the task of manual counting would be very time consuming. If you need to count the values in a table, this function does the work for you.

Note

All arguments that are numbers (including zero), dates, or text representations of numbers are counted. Arguments that are error values or text that cannot be converted into numbers are not counted.

If an argument is an array or a reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are ignored. If you want to count logical values, text, or error values, use the COUNTA() function.

ExampleFigure 12-28 shows an example table with the sales from January 2007 through November 2008 that were entered by the sales representatives of the software company.

You are the manager of the sales department and use the COUNT() function to find the number of months over a two-year period in which sales were made. You specify the range C3:C25 in the function COUNT(C3:C25), and the formula returns 19.

The table contains the sales for certain dates in the range C3:C25.

Figure 12-28. The table contains the sales for certain dates in the range C3:C25.

Tip: Display number arguments in the status bar

If the data is selected, the number arguments are also displayed in the status bar. Right-click the status bar and select Numerical Count on the menu (see Figure 12-29).

The information for the selected argument is displayed in the status bar (see Figure 12-30).

See Also

AVERAGE(), COUNTA(), DCOUNT(), DCOUNTA(), SUM()