À propos de cet exercice
Un jeu de données de 180 lignes sur 2 feuilles, une cellule de réponse, environ 6 minutes. Corrigé dans votre navigateur : la valeur et la formule qui la produit, avec des indications sur la correction à apporter.
Comment le résoudre
- Requests!E2
=XLOOKUP(C2,Directory!$D$2:$D$91,Directory!$A$2:$A$91)
XLOOKUP takes the column to search and the column to return as two separate ranges, so their relative position does not matter: here the search column (Email, D) is to the right of the return column (Employee ID, A). VLOOKUP cannot do this, because it only returns columns to the right of its first column. Text matching in XLOOKUP, like in all Excel lookups, ignores case, which is why "Maya.Patel@…" finds "maya.patel@…".
Pitfall 1: lookups ignore case but not spaces — an email pasted with a trailing space returns #N/A; wrap the lookup value in TRIM when the source is a web form. Pitfall 2: emails are good keys only while they are unique; a shared mailbox used by two people returns the first match silently. Pitfall 3: the pre-365 work-arounds all work in this engine except one — INDEX/MATCH =INDEX(Directory!$A$2:$A$91,MATCH(C2,Directory!$D$2:$D$91,0)) and the array trick =LOOKUP(2,1/(Directory!$D$2:$D$91=C2),Directory!$A$2:$A$91) compute correctly, while the VLOOKUP-with-CHOOSE({1,2},…) trick does not evaluate in this browser engine (it does in desktop Excel). Alternative in 365: =XLOOKUP(C2,Directory!$D$2:$D$91,Directory!$A$2:$A$91,"Unknown email") adds a readable fallback. Design note: looking left is the most common reason teams finally abandon VLOOKUP — reordering the source table to put the key first is not an option when the sheet is owned by HR.
Autres méthodes valables
- =XLOOKUP(C2,Directory!$D$2:$D$91,Directory!$A$2:$A$91,"Unknown email") — with a fallback for emails that are not in the directory
- =INDEX(Directory!$A$2:$A$91,MATCH(C2,Directory!$D$2:$D$91,0)) — the version-independent form (not accepted here: this task practices XLOOKUP)
Erreurs fréquentes
Trying =VLOOKUP(C2,Directory!$D$2:$D$91,-3,FALSE) or a table starting at D: VLOOKUP cannot count backwards, so the result is #VALUE! or #N/A. With XLOOKUP you simply pass the Employee ID column as the return array.
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.