Practice / Lookup & Reference

Look up salary by employee ID (XLOOKUP)

Easy Lookup & Reference

You are putting together a department salary report. Employee IDs and departments are already filled in, but the Matched salary column is still empty. Write a formula in G2:G6 so each row looks up the salary for the employee ID in column E from the staff roster in columns A–C.

Your solution should use cell references so it updates automatically when Test Case input values change.

Hints 0/4
Solutions 3
–
Test case
1
2
3
Reset
Submit
fx
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9
10
Loading interactive spreadsheet...
Preparing grid cells and formula calculation engine
○ Ready Enter formula in highlighted cells, then click Submit.

Notes

XLOOKUP does not require a column index. Keep lookup and return arrays the same height. Default match mode is exact. Lock the table ranges with $ if you fill the formula down.

Function guide

FAQ

How do I look up a salary with XLOOKUP?

Use =XLOOKUP(E2, A2:A6, C2:C6) when E2 holds the ID, A2:A6 the ID list, and C2:C6 the salaries. Fill down for the other Lookup ID rows.

Does XLOOKUP need a column index like VLOOKUP?

No. You pass the return array directly, so column moves will not break a column-index argument.

Why lock ranges with $ when filling down?

Without $, A2:A6 and C2:C6 shift as you copy the formula down. Absolute refs $A$2:$A$6 and $C$2:$C$6 keep the employee table fixed while E2 becomes E3, E4, and so on.