The Purpose of a Count Function
Microsoft Excel's Count function does just what the name suggests: it counts data. This is useful when you have a list of data entries that are too long to easily count, constantly change or are intermingled with different data types. In these cases, the Count function looks through a specified range of cells and returns the number of actual data points.
-
What It Counts
-
The Count function only counts the number of cells containing numerical data. If text, error messages or empty cells are included within the specified range of cells, they are ignored. This is useful when you need to count numerical data in a range of cells but want to omit the data headers.
Format
-
The Count function uses the format "=COUNT(range)", where "range" is the range of cells you wish to specify. As an example, to count all numerical data between cells A1 through A20, you would enter the formula "=COUNT(A1:A2)" without quotes.
-
Range
-
The specified range addresses a range of cells, manually entered numbers, entire columns or full rows. As examples, you might enter the range as "A1:A20", "20,10,30" or "A:A" or "1:1", respectively. Therefore, the complete formulas would be "=COUNT(A1:A20)", =COUNT(20,10,30)", "=COUNT(A:A)" or "=COUNT(1:1)".
Within Other Formulas
-
The Count function can also be used as part of other formulas. The Count function maintains the same format, but you would only include an equals sign at the beginning of the full formula. As an example, to calculate an average, you could use "=AVERAGE(A1:A20)" or "=SUM(A1:A20)/COUNT(A1:A20)", which offers the same result.
CountA Function
-
The CountA function works similarly to the Count function, except it includes all nonblank data cells, such as text and errors. Use the CountA function when you need to count all entries, regardless of their format.
-