Aller au contenu
GridBelt
  • Test Excel
  • Exercices
  • Programmes
  • Tarifs
Se connecter
Commencer le test gratuit
  • Test Excel
  • Exercices
  • Programmes
  • Tarifs
Se connecterCréer un compte
Commencer le test gratuit
GridBelt

Entraînez-vous sur Excel dans votre navigateur.

Test Excel

  • Niveau 1 : Débutant
  • Niveau 2 : Intermédiaire
  • Niveau 3 : Expert
  • Test Excel en 7 jours
  • Classement
  • Test Excel en entretien d’embauche
  • Évaluation Excel d’Indeed

Exercices

  • Tous les exercices
  • Programmes
  • Pour débutants

Guides

  • Formules Excel
  • Raccourcis Excel

Entreprise

  • À propos
  • Tarifs
  • Comment nous corrigeons

© GridBelt. Tous droits réservés.

  • Politique de confidentialité
  • Conditions d’utilisation
  • Politique de remboursement

Excel est une marque commerciale de Microsoft Corporation. Indeed, TestGorilla, SHL et les autres marques sont la propriété de leurs détenteurs respectifs. GridBelt est un site d’entraînement indépendant ; il n’est affilié ni à Microsoft, ni à TestGorilla, ni à SHL, ni à Indeed, et n’est ni cautionné ni sponsorisé par ces sociétés.

  1. Exercices
  2. /
  3. COUNTIF and COUNTIFS

COUNTIFS practice: orders per region and month from 300 rows

  • Intermédiaire
  • ~7 min
  • COUNTIF and COUNTIFS

Énoncé en anglais

The sales operations team pulled 300 orders from July to October 2026. The export carries the order date, a Month column (Jul, Aug, Sep, Oct) and the region (North, South, West). Management wants a month-by-region order count — the kind of table a pivot would give — as live formulas, so it refreshes with the export. The grid is laid out in F1:J4: regions down column F, months across row 1. Fill it with one formula.

Ce que vous devez faire

  1. 1Click G2. This cell must count the orders whose region is the label in F2 (North) and whose month is the label in G1 (Jul).
  2. 2Write COUNTIFS as pairs of range, criterion: the Region column D2:D301 against F2, then the Month column C2:C301 against G1.
  3. 3Lock the references for copying: both data ranges fully ($D$2:$D$301, $C$2:$C$301), the region label by column only ($F2) and the month label by row only (G$1). F4 / ⌘T cycles through the $ variants.
  4. 4Press Enter, then fill G2 right to J2 with the fill handle, then select G2:J4 and press Ctrl+D / ⌘D to fill the row down to row 4. The twelve counts must add up to 300. Then click Check.

Cellules de réponse

Correction

Saisissez votre formule dans la grille, appuyez sur Enter, puis cliquez sur Vérifier. Nous corrigeons la valeur de chaque cellule de réponse et la formule qui la produit.

Tâches

  1. Non vérifiéFill G2:J4 with the number of orders per region (labels in F2:F4) and month (labels in G1:J1) using COUNTIFS over D2:D301 and C2:C301 — one formula with mixed references, copied across the whole grid.

Ordinateur recommandé pour les tâches dans la feuille de calcul. La feuille défile à l’intérieur de ce cadre.

StartInsertFormulasDataView
A1fxPréparation de votre classeur…
A
B
C
D
E
F
G
H
I
J
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sheet1

Saisissez votre formule dans la feuille, puis vérifiez.

À propos de cet exercice

Un jeu de données de 300 lignes sur une feuille, une cellule de réponse, environ 7 minutes. Corrigé dans votre navigateur : la valeur et la formule qui la produit, avec des indications sur la correction à apporter.

Comment le résoudre

  • G2=COUNTIFS($D$2:$D$301,$F2,$C$2:$C$301,G$1)

COUNTIFS counts the rows where every range/criterion pair is satisfied at the same time: region equals the row label and month equals the column label. The mixed references do the rest: $F2 always reads the region in column F of the cell's own row, G$1 always reads the month in row 1 of the cell's own column, and the data ranges are fully locked. One formula therefore fills all twelve cells, and the counts add up to the 300 orders because every order has exactly one region and one month.

Pitfall 1: locking the wrong half (F$2 and $G1) makes the first row and column look right and everything else wrong — check the bottom-right cell's formula after filling. Pitfall 2: the Month column must match the header text exactly ("Jul", not "July" or "07"); when the export has only dates, add two date conditions per month (">="&first day, "<="&last day) or a helper column =TEXT(B2,"mmm"). Pitfall 3: COUNTIF (singular) takes one pair only; typing COUNTIF with two pairs returns a #VALUE! or counts the wrong thing. Alternatives: SUMPRODUCT(($D$2:$D$301=$F2)*($C$2:$C$301=G$1)) is the array form and also works in very old versions; a pivot table gives the same grid in four clicks but does not refresh automatically with a pasted export unless you refresh it. In Excel 365, =COUNTIFS($D$2:$D$301,F2:F4,$C$2:$C$301,G1:J1) in G2 spills the whole 3 × 4 grid from one cell.

Autres méthodes valables

  • =SUMPRODUCT(($D$2:$D$301=$F2)*($C$2:$C$301=G$1)) — array form, same mixed references
  • =COUNTIFS($C$2:$C$301,G$1,$D$2:$D$301,$F2) — the pairs in the other order
  • =COUNTIFS($D$2:$D$301,F2:F4,$C$2:$C$301,G1:J1) in G2 — Excel 365 only; one spilling formula for the grid

Erreurs fréquentes

Filling =COUNTIFS($D$2:$D$301,F2,$C$2:$C$301,G1) across without the mixed $: in H2 the labels slide to G2 (an answer cell) and H1, so the second column onwards counts the wrong things or returns 0.

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.

Dans ces programmes

  • Excel test in 7 days, Plan de niveau 2Jour 3
  • Learn Excel From ScratchJour 11

Exercices associés

  • Orders per status with COUNTIFDébutant, ~5 min
  • Orders between two datesIntermédiaire, ~6 min
  • Sales by region and product with SUMIFSIntermédiaire, ~7 min

Référence de la fonction

Documentation officielle

Exercice suivant

Orders between two dates