À propos de cet exercice
Un jeu de données de 120 lignes sur une feuille, une cellule de réponse, environ 4 minutes. Corrigé dans votre navigateur : la valeur et la formule qui la produit, avec des indications sur la correction à apporter.
Comment le résoudre
- H2
=COUNTIF(D2:D121,"*.edu")
COUNTIF accepts wildcards in text criteria: * stands for any sequence of characters (including none) and ? for exactly one character. "*.edu" therefore matches every address that ends in .edu, whatever comes before, and the comparison ignores case — 38 rows here. Because nothing may follow the pattern, an address ending in .edu.au is not matched, which is exactly the distinction finance needs.
Pitfall 1: "*edu*" matches "edu" anywhere — it returns 45 on this list by also counting .edu.au addresses and domains such as educonsult.com and medu.org. Pitfall 2: "*.edu" also matches a bare value ".edu" or "x.edu" with no @; if the data can contain junk, "*@*.edu" is the stricter pattern. Pitfall 3: to match a literal asterisk or question mark, escape it with a tilde ("~*"); and wildcards only work on text — a numeric column needs its own criteria (">500"). Alternatives: SUMPRODUCT(--(RIGHT(D2:D121,4)=".edu")) tests the last four characters without wildcards; COUNTIFS(D2:D121,"*.edu") is the same count with room for a second condition (role, country). In Excel 365, =ROWS(FILTER(D2:D121,RIGHT(D2:D121,4)=".edu")) lists and counts in one go; COUNTIF remains the fastest and most portable version.
Autres méthodes valables
- =COUNTIF(D2:D121,"*@*.edu") — stricter: requires an @ before the domain
- =COUNTIFS(D2:D121,"*.edu") — the same count written with COUNTIFS (not accepted here, because this task asks for COUNTIF)
- =SUMPRODUCT(--(RIGHT(D2:D121,4)=".edu")) — compares the last four characters instead of using a wildcard
Erreurs fréquentes
Writing the criterion as "*edu*" or "edu": the first over-counts (45 instead of 38) because it also matches .edu.au and company names containing "edu"; the second counts nothing, because COUNTIF without wildcards needs the whole cell to equal the text.
Comment nous corrigeons
Toute formule qui produit le bon résultat est acceptée, sauf si la tâche nomme une fonction : une autre fonction rapporte alors la moitié des points. Nous comparons les valeurs avec une petite tolérance et ignorons la casse et les espaces dans le texte. Un nombre correct saisi à la main au lieu d’une formule rapporte la moitié des points. Les tâches sur plusieurs cellules rapportent tous les points avec 100 % de cellules justes, la moitié à partir de 50 %. Lorsque c’est pertinent, nous modifions aussi une cellule d’entrée sur une copie de votre feuille et vérifions que votre formule suit.
Réponses calculées selon les règles d’Excel 365 et vérifiées dans notre correcteur le 16 novembre 2026. Auteur : GridBelt team.