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. XLOOKUP

XLOOKUP look-left practice: employee ID by email

  • Expert
  • ~6 min
  • XLOOKUP
  • Excel 365

Énoncé en anglais

IT received 90 system-access requests in November 2026; the request form captured only the requester's email (column C of the Requests sheet). The HR Directory sheet lists 90 employees with the employee ID in column A and the email in column D — the ID sits to the left of the key, which VLOOKUP cannot return. A few emails were typed with capital letters; Excel lookups ignore case, so they still match. Fill column E with the employee ID for every request.

Ce que vous devez faire

  1. 1On Requests, click E2 and type =XLOOKUP(C2, — the email is the value to find.
  2. 2Click the Directory tab, select the Email column D2:D91 and press F4 (Windows) or ⌘T (Mac) to lock it; type a comma.
  3. 3Still on Directory, select the Employee ID column A2:A91, lock it, close the bracket and press Enter — the return column can be anywhere, including left of the lookup column.
  4. 4Fill E2 down to E91. Spot-check one of the capitalised emails: it returns the same ID as its lower-case twin.

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éOn the Requests sheet, in E2, use XLOOKUP to return the employee ID (Directory column A) for the email in C2, matching against the Email column of the Directory sheet, then fill down to E91.

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 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.

Dans ces programmes

  • Excel for Data AnalystsJour 9

Exercices associés

  • Replace VLOOKUP with XLOOKUPIntermédiaire, ~6 min
  • Two-criteria lookup (product and region)Expert, ~10 min
  • INDEX and MATCH exact lookupIntermédiaire, ~6 min
  • Look up a customer tier from another sheetDébutant, ~5 min

Référence de la fonction

Documentation officielle

Exercice suivant

Two-criteria lookup (product and region)