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.SI(COUNTIF)

Counts the cells that match a condition.

What it does

COUNTIF counts how many cells in a range meet one condition: equal to some text, above a number, or matching a pattern with wildcards.

Syntax

=NB.SI(range; criteria)

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

Arguments

range
The cells to check.
criteria
The condition: text in quotes, a comparison in quotes such as ">=50", a cell, or a pattern like "A*".

Example

A list shows the colour of each order. How many orders are red?

ABC
1ColourRed orders
2Red3
3Blue
4Red
5Green
6Red

The formula in C2:

=NB.SI(A2:A6;"Red")

Result: 3

Red appears in A2, A4 and A6, so the count is 3. The match ignores upper and lower case.

Common mistakes

  • Putting a cell reference inside the quotes. To count values above the number in D1, write ">"&D1, not ">D1".
  • Expecting it to check several conditions. For more than one, use COUNTIFS.
  • Extra spaces in the data. A cell with a space after the word isn't equal to the plain word.

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
EnglishCOUNTIF,
DeutschZÄHLENWENN;
FrançaisNB.SI;
Español (España)CONTAR.SI;
Español (México)CONTAR.SI,
日本語COUNTIF,
한국어COUNTIF,
繁體中文COUNTIF,
ไทยCOUNTIF,
ខ្មែរCOUNTIF,
Tiếng ViệtCOUNTIF;

Practise it

More from this module

All functions