Cellgrids Cellgrids
Home › Practice questions › VLOOKUP › Question 2

Excel VLOOKUP Practice Question: Find the department of the employee ID typed in E2 and put it in F2.

By Rinkesh Shah, founder of Cellgrids.

The question

Find the department of the employee ID typed in E2 and put it in F2.

The data

ABCDEF
1IDNameDeptIDDept
2E-201AshaFinanceE-205?
3E-202BenSales
4E-203ChitraHR
5E-204DevIT
6E-205EshaSales
7E-206FarahIT

The yellow cell is where your answer goes.

Show answer

Answer in F2: Sales

How it works

Explanation: VLOOKUP can return text just as well as numbers. The column number counts from the first column of the table.
Syntax: =VLOOKUP(E2,A2:C7,3,FALSE)
E-205 is Esha. Dept is the 3rd column, so the result is Sales.

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 →

VLOOKUP syntax

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

Looks up a value in the first column of a range and returns a value from another column, same row. Pulling an employee's salary into another sheet using their ID. Full VLOOKUP guide.

More VLOOKUP practice questions

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