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?
| A | B | C | |
|---|---|---|---|
| 1 | Colour | Red orders | |
| 2 | Red | 3 | |
| 3 | Blue | ||
| 4 | Red | ||
| 5 | Green | ||
| 6 | Red |
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 language | Function name | Separator |
|---|---|---|
| English | COUNTIF | , |
| Deutsch | ZÄHLENWENN | ; |
| Français | NB.SI | ; |
| Español (España) | CONTAR.SI | ; |
| Español (México) | CONTAR.SI | , |
| 日本語 | COUNTIF | , |
| 한국어 | COUNTIF | , |
| 繁體中文 | COUNTIF | , |
| ไทย | COUNTIF | , |
| ខ្មែរ | COUNTIF | , |
| Tiếng Việt | COUNTIF | ; |