Excel function

COUNTfunction

Counts the cells that contain numbers.

All versions
=COUNT(B2:D6)
A
B
C
D
1
2
3
4
5
6

Drag the corner dots to change value1. Count the same range on the COUNTA and COUNTBLANK pages and compare. Try breaking it on purpose to see the errors.

Result

11

value1
B2:D6Drag the corner dots on the table

The cells to count.

What is the COUNT function?

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

COUNT counts the cells that contain numbers. Text and blank cells are not counted.

Use it to count how many scores were entered or how many tests were taken. To include text, use COUNTA; to count blanks, use COUNTBLANK.

Arguments

value1
The cells or range to count.
value2, ...
Optional. Up to 255 arguments.

COUNT examples

  1. Example 1. Cells with scores

    =COUNT(B2:D6)

    Counts the 11 of 15 cells with numbers. The 2 "Absent" and 2 blank cells are not counted.

  2. Example 2. People who took Test 2

    =COUNT(C2:C6)

    Test 2 has 3 numbers and 2 "Absent", so the result is 3.

  3. Example 3. The name column is 0

    =COUNT(A2:A6)

    Names are text, so there are no numbers. Use COUNTA to count names.

Common mistakes

FAQ

COUNT vs COUNTA?
COUNT counts only numbers; COUNTA counts every non-empty cell. Comparing them on the same range tells you how many cells hold text.
Are dates counted?
Yes. Excel stores dates as numbers.
Counting blanks?
Use COUNTBLANK.