fxExcelReps
← All functions Σ Math & statistics · Beginner

COUNT Count cells that contain numbers.

How to use COUNT in Excel

COUNT counts how many cells contain numbers (dates count too, because they're numbers). Text, errors and empty cells are ignored.

Syntax

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

value1A range or value to count.
[value2], …Optional additional ranges.

Examples

=COUNT(B2:B100)How many orders have a numeric amount.
=COUNT(A:A)How many numbers are in column A.
=ROWS(B2:B100)-COUNT(B2:B100)How many rows are not numbers.

COUNT, COUNTA and COUNTBLANK: which one?

They answer three different questions about the same range. Mixing them up is the usual reason a count looks wrong.

=COUNT(B2:B100)How many cells contain a number (dates count too).
=COUNTA(B2:B100)How many cells are not empty, numbers and text.
=COUNTBLANK(B2:B100)How many cells are empty.

Find numbers stored as text

If COUNT and COUNTA give different results on a column that should hold only numbers, the difference is the cells stored as text.

=COUNTA(B2:B100)-COUNT(B2:B100)How many values in B are text, not numbers.
=IF(COUNTA(B2:B100)=COUNT(B2:B100), "All numbers", "Check text values")A quick data check before you add the column up.

Common mistakes

Count is lower than expected
Some numbers are stored as text. COUNT ignores them.
Want to count text too?
Use COUNTA. To count by a condition, use COUNTIF.

Frequently asked questions

Does COUNT count text?

No, only numbers, dates and times. To count everything that isn't empty, use COUNTA.

How do I count cells with a condition?

Use COUNTIF: =COUNTIF(C2:C500, "Overdue"), or COUNTIFS for several conditions.

Why is my count lower than expected?

Some numbers are stored as text, often after an import from another system. COUNT skips them. Convert them with Data → Text to Columns → Finish.

How do I count unique values?

In Microsoft 365: =COUNTA(UNIQUE(A2:A500)). More ways in find unique values in Excel.

Available in: All versions of Excel, Excel for the web, Google Sheets

Related functions

COUNTACOUNTBLANKCOUNTIFCOUNTIFS

↑ Practise COUNT in the sheet above