Function · Statistical

Excel COUNT function

The Excel COUNT function counts cells that hold numbers. The same six-cell log that COUNTA scores as 4 contains 2 numbers.

All current Excel versions. Also in Excel for the web and Google Sheets.

Syntax =COUNT(value1, [value2], ...)

COUNT
=COUNT(B2:B7)

Arguments

NameRequiredWhat to pass
value1RequiredThe first number, cell, or range.
value2OptionalMore values or ranges. In a range, only numbers and dates are counted. Text, blanks, TRUE, FALSE, and errors are skipped.

Examples

Hours in a log that also holds names

=COUNT(B2:B7)

Result 2

=COUNT(B2:B7)B8
Hours log
AB
1#Entry
21Maya
328
43
54Jordan
65
766
8Numbers2
A picture of the sheet, not a live calculator. Dates would count too, because a date is a number. The names do not.

COUNT counts numbers. On the hours log, Maya and Jordan are text, two cells are empty, and the only numbers are 8 and 6. COUNT returns 2. Dates count, because a date is a serial number. Text that looks like a number does not, when it sits in a cell.

The exception is an argument you type yourself. =COUNT(B2:B7,"1") counts the numbers in the range and also counts the quoted 1, because a number you type into the argument list is counted even as text. A range does not get that treatment. Use COUNT when the denominator of an average should be “how many numeric answers,” and COUNTA when a name is as good as a number.