VLOOKUP practice exercises (with answers)
Ten graded VLOOKUP problems on a small staff table—exact match, fill-down locks, IFERROR, and the approximate-match trap—plus links into live drills.
These exercises use one staff table. Put it in A1:D7 (headers in row 1), write each answer in column F, then check yourself against the formulas below. When you want the same pattern checked in a live grid, open the VLOOKUP function guide or the VLOOKUP practice lesson.
The practice table
A1:D1— EmpID, Name, Dept, Salary101, Ada, Finance,65000102, Bob, Marketing,72000103, Chen, HR,58000104, Dia, IT,82000105, Eli, Finance,61000106, Fay, Marketing,69000
Exact-match refresher
=VLOOKUP(lookup_value, table_array, col_index_num, FALSE)
Always pass FALSE (or 0) for IDs and names unless you intentionally want a sorted band lookup. Leaving the fourth argument blank is the same as TRUE, which quietly returns the wrong row on unsorted IDs.
Exercise 1 — name from ID
In F2, return the Name for EmpID 104.
Answer: =VLOOKUP(104, $A$2:$D$7, 2, FALSE) → Dia
Exercise 2 — lookup from a cell
Type 102 in E3. In F3, return that employee’s Dept.
Answer: =VLOOKUP(E3, $A$2:$D$7, 3, FALSE) → Marketing
Change E3 to 105 and the department should become Finance without editing the formula.
Exercise 3 — salary fill-down
In E4:E6 type 101, 103, 106. In F4, return Salary, then fill down to F6.
Answer in F4: =VLOOKUP(E4, $A$2:$D$7, 4, FALSE)
Lock the table with $ before you fill. Without $A$2:$D$7, the range slides down and lower IDs start returning #N/A even though they exist.
Exercise 4 — missing key
In F7, look up EmpID 199.
Answer: =VLOOKUP(199, $A$2:$D$7, 2, FALSE) → #N/A
#N/A here means “not found,” not a broken formula. That is the correct result.
Exercise 5 — friendly missing message
Change exercise 4 so a missing ID shows Not on roster instead of #N/A.
Answer: =IFERROR(VLOOKUP(199, $A$2:$D$7, 2, FALSE), "Not on roster")
Use IFERROR only when a blank or message is expected. Do not wrap every lookup by habit—it also hides real mistakes like a wrong column index.
Exercise 6 — wrong column index
Someone writes =VLOOKUP(101, $A$2:$D$7, 5, FALSE). What happens, and why?
Answer: #REF! — column 5 is past a four-column table. Count columns from the left edge of the table_array, not from column A of the sheet if those differ.
Exercise 7 — text vs number IDs
Store EmpID 101 as text in E8 (type '101 or format the cell as Text). Look up Name with a normal VLOOKUP on the numeric table.
Answer: you get #N/A until types match. Fix with =VLOOKUP(VALUE(E8), $A$2:$D$7, 2, FALSE) or clean the ID column so both sides are numbers (or both text).
Exercise 8 — trailing space trap
In E9 type Ada with a trailing space (Ada ). Try to return salary by looking up Name after moving Name to the first column of a helper table—or rebuild as =VLOOKUP(TRIM(E9), …) once Name is leftmost.
Answer: dirty text breaks exact match. Clean keys with TRIM before you blame VLOOKUP. See also Clean text before you look it up.
Exercise 9 — approximate match on purpose
Build a grade band table in A11:B14:
0→ Fail50→ Pass70→ Merit85→ Distinction
In F11, return the grade for score 72 using approximate match.
Answer: =VLOOKUP(72, $A$11:$B$14, 2, TRUE) → Merit
The first column must be sorted ascending. Approximate match is for bands (tax, shipping, grades)—not for employee IDs.
Exercise 10 — the interview trap
What is wrong with =VLOOKUP(A2, B2:D50, 3) filled down a column of order lines?
Three issues show up in live tests: the fourth argument is missing (approximate match), the table is not locked with $, and VLOOKUP cannot return a column to the left of the lookup column. Say those three out loud in an interview—that narration scores higher than memorizing the function name.
Check your work in a live sheet
- Read syntax and mistakes in the VLOOKUP guide.
- Drill exact match in VLOOKUP practice and More VLOOKUP practice.
- Practice bands in VLOOKUP approximate match.
- When you are ready to retire column indexes, compare patterns in VLOOKUP vs XLOOKUP and move to XLOOKUP practice exercises.