How to use XLOOKUP in Google Sheets
In Google Sheets, XLOOKUP is a modern and flexible alternative for VLOOKUP, to find a value from a table or a list and then return a related result.
In this example, we'll retrieve an employee's email based on their ID:
Formula in G3
=XLOOKUP(G2,B3:B6,D3:D6)
A
B
C
D
E
F
G
H
1
👇 Try changing this value
2
ID
Name
Email
Lookup value
3
101
James
james@example.com
Result
elizabeth@example.com
4
102
Mary
mary@example.com
5
103
Elizabeth
elizabeth@example.com
6
104
Ashley
ashley@example.com
7
Show arrows
Separator
Procedure
- Enter =XLOOKUP in cell G3, where you want the Email address to appear.
- Enter the Lookup value G2, containing the ID (103) you want to look for.
- Enter the Search range B3:B6, the range of data that contains all the ID values.
- Enter the Result range D3:D6, containing the Email values your want to return.
Result
The final formula is: =XLOOKUP(G2, B3:B6, D3:D6)
XLOOKUP returns the value in D5, which is elizabeth@example.com.