Cellgrids Cellgrids
Home › Practice questions › XLOOKUP › Question 3

Excel XLOOKUP Practice Question: Using XLOOKUP, find the roll number of the student named in E2 and put it in…

By Rinkesh Shah, founder of Cellgrids.

The question

Using XLOOKUP, find the roll number of the student named in E2 and put it in F2. The roll numbers are to the left of the names.

The data

ABCDEF
1RollNameMarksStudentRoll
2101Ritu78Tara?
3102Sumit85
4103Tara91
5104Uday66
6105Vani72

The yellow cell is where your answer goes.

Show answer

Answer in F2: 103

How it works

Explanation: XLOOKUP can return a column that is to the left of the lookup column. VLOOKUP cannot do this.
Syntax: =XLOOKUP(E2,B2:B6,A2:A6)
Tara is the third name, so the matching roll number in column A is 103.

Try it yourself in the live sheet

Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.

Try this question in the live sheet →

XLOOKUP syntax

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found])

The modern replacement for VLOOKUP — searches any column and returns from any other, no column counting needed. XLOOKUP is used to pull matching data from one part of a workbook into another. Full XLOOKUP guide.

More XLOOKUP practice questions

All practice questions · Excel exercises · Interview prep · Cheat sheet