ExcelFormulas logoExcelFormulas.
Demander à l'IA
Maths et statistiquesVérifié par QA

COUNTIF.

Counts the number of cells within a range that meet a single specified condition or criteria.

Maths et statistiques
ExcelExcel 365Excel 2021Excel 2019Google Sheets

Fonctionnement détaillé.

COUNTIF est une fonction indispensable d'Excel. Counts the number of cells within a range that meet a single specified condition or criteria. Elle permet d'automatiser vos tableaux, fiabiliser vos calculs et gagner un temps précieux au quotidien dans vos feuilles de calcul.

💡 En résumé simple.

Counts how many cells in a list match a rule you specify, such as counting scores over 75 or orders marked "Yes".

Analogie du quotidien

"Think of COUNTIF like a bouncer at a club checking IDs. It looks down your list and counts only the people who meet your rule (e.g. age 21 or over)."

Syntaxe.

Notation Standard Excel
=COUNTIF(range, criteria)
Conseil : Les arguments entre crochets [comme_ceci] sont facultatifs ; tous les autres sont obligatoires.

Arguments.

Détail de l'ensemble des paramètres acceptés par cette fonction.

rangeObligatoire

The group of cells you want to count.

Exemple : B2:B6
criteriaObligatoire

The condition that defines which cells to count. Can be a number, text, expression, or cell reference.

Exemple : ">=100"

Exemple pas à pas.

Cas d'usage concret

Count High-Value Transactions

Count how many transactions in column B are greater than or equal to $100.

CustomerPurchase AmountStatusCriteriaCount Result
Alice150Completed>=100—
Bob85Completed——
Charlie210Pending——
Formule appliquée
=COUNTIF(B2:B6, ">=100")
Résultat attendu ::3

Evaluates COUNTIF over the sample table cells, placing the verified output in cell E2.

Générateur de formule.

Ouvrir l'assistant complet

Personnalisez les champs ci-dessous pour générer une formule prête à être copiée dans votre classeur.

Generated FormulaPrête à copier

Nature du résultat produit.

Returns number 3 based on sample evaluation criteria and active cell references.

Exemple produit ::3
Type de sortie ::Numeric

Bonnes Pratiques

  • Use wildcards to find partial text matches: "*east*" matches any cell containing "east".
  • When using logical operators with numbers, enclose the operator and number in double quotes: ">=100".
  • For case-insensitive counts, COUNTIF automatically ignores uppercase/lowercase differences.

Erreurs à Éviter

  • COUNTIF only supports a single condition. If you need to count cells meeting multiple conditions, use COUNTIFS.
  • Text strings over 255 characters return incorrect results in COUNTIF.
Matrice de Compatibilité

Compatibilité par logiciel et version.

Vérification effectuée selon les moteurs de calcul officiels de Microsoft et Google.

Excel✓
Pris en charge
Excel 365✓
Pris en charge
Excel 2021✓
Pris en charge
Excel 2019✓
Pris en charge
Google Sheets✓
Pris en charge
Historique des versions Excel

Core standard function supported across all modern and legacy Microsoft Excel versions (365, 2021, 2019, 2016, 2013, 2010), as well as Excel for the Web and Mac.

Notes de compatibilité Google Sheets

100% compatible with Google Sheets. Uses identical argument order, data types, and standard calculation logic.

Questions fréquentes.

Questions Techniques
Can COUNTIF evaluate multiple conditions at once?↓

No, COUNTIF only checks a single condition. To count rows matching multiple simultaneous criteria, use the COUNTIFS function.

How do wildcards work in COUNTIF?↓

You can use an asterisk (*) to match any series of characters (e.g. =COUNTIF(A2:A10, "*East*")) or a question mark (?) to match any single character. To match an actual question mark or asterisk, prepend a tilde (~).