À propos de cet exercice
Un jeu de données de 11 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
- B12
=VLOOKUP(B10,$A$2:$M$7,MATCH(B11,$A$1:$M$1,0),FALSE)
MATCH(B11,$A$1:$M$1,0) scans the header row for the month and returns its position — "Jul" is the 8th cell of A1:M1 — and that number becomes VLOOKUP's column argument. VLOOKUP then finds the KPI row by its name in column A and returns the cell in that column. Because both the row and the column are looked up from the input cells, the box answers any KPI-and-month combination without touching the formula.
Pitfall 1: MATCH must run over a range that starts at the same column as the VLOOKUP table (A1:M1 for a table starting in A); running it over B1:M1 returns a position that is one too small and silently gives the previous month. Pitfall 2: the third argument of MATCH must be 0 for an exact match; with it omitted MATCH assumes the months are sorted alphabetically and returns nonsense. Pitfall 3: month names must match the header exactly — "July" will not find "Jul"; a data-validation list on the input cell removes the problem. Alternatives: =INDEX($B$2:$M$7,MATCH(B10,$A$2:$A$7,0),MATCH(B11,$B$1:$M$1,0)) is the two-way INDEX/MATCH form; =HLOOKUP(B11,$B$1:$M$7,MATCH(B10,$A$1:$A$7,0),FALSE) flips the roles; in 365, =XLOOKUP(B11,$B$1:$M$1,XLOOKUP(B10,$A$2:$A$7,$B$2:$M$7)) nests two XLOOKUPs. Design note: VLOOKUP + MATCH is also how you make a lookup survive inserted columns — the column number is recomputed from the header every time.
Autres méthodes valables
- =INDEX($B$2:$M$7,MATCH(B10,$A$2:$A$7,0),MATCH(B11,$B$1:$M$1,0)) — INDEX with two MATCH calls
- =HLOOKUP(B11,$B$1:$M$7,MATCH(B10,$A$1:$A$7,0),FALSE) — HLOOKUP finds the month column, MATCH supplies the row number
- =VLOOKUP(B10,$A$2:$M$7,MATCH(B11,$B$1:$M$1,0)+1,FALSE) — MATCH over B1:M1 needs +1 to account for the KPI column
Erreurs fréquentes
Hard-coding the column: =VLOOKUP(B10,$A$2:$M$7,8,FALSE) shows the right number for Jul and keeps showing Jul after the month in B11 is changed to Nov — the grader changes the month and expects the value to follow.
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.