Find who earns a given salary (INDEX + MATCH)
Payroll flagged one salary amount for audit, but the query came back as a number — you need the person. The roster keeps names in the first column and salaries in the last, and the amount to trace sits in E2. Return the matching employee's name in the Employee cell F2.
Your solution should use cell references so it updates automatically when Test Case input values change.
Notes
This is a reverse lookup: the search key is on the right of the value you want. VLOOKUP cannot look left without a helper column, but MATCH finds the row and INDEX fetches any column from it — the classic interview answer.
FAQ
How do I look left in a table?
Use INDEX + MATCH: =INDEX(A2:A6, MATCH(E2, C2:C6, 0)). MATCH locates the row by the salary, INDEX returns the name from the same row — no helper column needed.
What does the 0 in MATCH mean?
It sets the match type to exact. With 1 or -1, MATCH assumes sorted data and returns an approximate position, which silently produces wrong names here.
Why prefer INDEX/MATCH over VLOOKUP for this?
VLOOKUP only searches the leftmost column of its table and returns columns to the right. When the key sits to the right of the result — like salary here — INDEX/MATCH (or XLOOKUP) is the standard answer.