COUNT Function

Counts how many cells contain numbers.

Category

Statistical

Available in

All versions, Microsoft 365

Returns

A whole number

Taught hands-on in Level 2: Essential Formulas & Everyday Logic · Frequently Used Functions module

Overview

COUNT counts the cells that hold numbers — including dates, times and zeros. Text, TRUE/FALSE, errors and empty cells aren't counted.

To count every non-empty cell, use COUNTA; to count empty ones, COUNTBLANK.

Syntax

=COUNT(value1, [value2], …)

Arguments

ArgumentRequired?What it does
value1YesA value, cell or range.
value2, …NoUp to 255 more values, cells or ranges.

Examples

Example 1 — How many people have a score?

Only real numbers count — "absent", "pending" and the blank don't.

D2fx=COUNT(B2:B8)
ABCD
1NameScoreScores
2Ana824
3Benabsent
4Cy91
5Di
6Ed77
7Fay0
8Guspending
=COUNT(B2:B8) Explain

Example 2 — Count across several ranges

Separate ranges with commas.

=COUNT(B2:B8,E2:E8) Explain

Common mistakes

  • Numbers stored as text aren't counted. Imported "numbers" that are really text give a lower count than expected. Convert them with VALUE.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.