Skip to content

Lessons in your language are coming soon. Formulas already work in your Excel language.

This page isn't translated yet, so its text is in English. Function names and formulas are shown in your Excel language.

Excel function · Counting

NB(COUNT)

Counts the cells that contain numbers.

What it does

COUNT tells you how many cells hold a number. Dates count too, because Excel stores them as numbers. Text, empty cells and errors are not counted.

Syntax

=NB(value1; [value2]; …)

Arguments in square brackets are optional, and … means you can add more of the same. In this Excel language, arguments are separated by ;

Arguments

value
A range or cell to look at. Add more arguments to count across several ranges.

Example

Five students took a test. How many scores were entered?

AB
1StudentScore
2Ana78
3Benabsent
4Kai91
5Lia
6Mo65
7Scores entered3

The formula in B7:

=NB(B2:B6)

Result: 3

B2, B4 and B6 hold numbers. Ben's cell says absent, which is text, and Lia's is empty, so the count is 3.

Common mistakes

  • Using COUNT to count names or other text. It only counts numbers; COUNTA counts any cell that isn't empty.
  • Numbers stored as text are not counted. A score typed with a leading apostrophe, or pasted from a web page, may be text.

In other Excel languages

Excel translates function names, and in some languages the argument separator too. Type the name your Excel shows.

Excel languageFunction nameSeparator
EnglishCOUNT,
DeutschANZAHL;
FrançaisNB;
Español (España)CONTAR;
Español (México)CONTAR,
日本語COUNT,
한국어COUNT,
繁體中文COUNT,
ไทยCOUNT,
ខ្មែរCOUNT,
Tiếng ViệtCOUNT;

Practise it

More from this module

All functions