# How to count cells that contain numbers in Excel

Use `=COUNT(B2:B11)`. COUNT includes numbers and dates and skips text, blanks and errors.

**Excel:** `=COUNT(B2:B11)` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D |
| --- | --- | --- | --- |
| Respondent | Age |  | Numeric answers |
| R-01 | 34 |  |  |
| R-02 | Prefer not to say |  |  |
| R-03 | 27 |  |  |
| R-04 |  |  |  |
| R-05 | 45 |  |  |
| R-06 | n/a |  |  |
| R-07 | 52 |  |  |
| R-08 | 19 |  |  |
| R-09 | thirty |  |  |
| R-10 | 38 |  |  |

Formula in E1: `=COUNT(B2:B11)`

Result: 6

## How it works

COUNT looks at each cell and counts it only if it holds a number. Text answers like "n/a" and "thirty" and the empty cell are ignored, which leaves the six usable ages.

Dates are numbers underneath, so COUNT counts them too.

## Other ways

- `=SUMPRODUCT(--ISNUMBER(B2:B11))`: The same count with ISNUMBER, handy when you need to add another condition.
- `=COUNTA(B2:B11)`: Counts every answer, text included. (Counts the text answers too.)

## Common mistakes

- Numbers stored as text (left-aligned, often with a green triangle) are not counted by COUNT. Convert them first, or count them too with `=SUMPRODUCT((B2:B11<>"")*ISNUMBER(--B2:B11))`.
- COUNT ignores TRUE and FALSE in a range, even though they act as 1 and 0 in arithmetic.

## Questions

**What is the difference between COUNT, COUNTA and COUNTBLANK?**

COUNT counts numbers, COUNTA counts anything that isn't empty, and COUNTBLANK counts empty cells.

**How do I count numbers above a value?**

Use COUNTIF: `=COUNTIF(B2:B11,">=40")`. It also skips text.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/count-cells-with-numbers
