VLOOKUP Practice Exercises: Step-by-Step Guide
In this article
To get real value from VLOOKUP practice exercises, open a blank spreadsheet and build a small lookup table with at least four columns, then write formulas that pull exact matches, handle missing values, and use absolute references. The point is not to memorise syntax but to train the habits that stop the four classic errors: wrong column count, relative references that shift, mismatched data types, and forgotten exact-match settings. You can do every exercise below in Excel, Google Sheets, or LibreOffice Calc; the function name and argument order are the same, though menu labels differ slightly by version and platform.
What You'll Need
- A spreadsheet application: Microsoft Excel (desktop or web), Google Sheets, or LibreOffice Calc. The steps below use Excel and Sheets; Calc works the same way with slightly different menus.
- A blank workbook with two sheets: one for the lookup table (name it Data) and one for your exercises (name it Practice).
- About 10–15 rows of sample data. Type it manually rather than importing, so you see every value.
- Basic familiarity with cell references (A2, B2) and the difference between relative and absolute references ($A$2).
Step-by-Step
- Build the lookup table. On the Data sheet, enter headers in row 1:
Product ID,Product Name,Category,Unit Price. Fill rows 2–11 with ten made-up products. Keep Product ID as text or number consistently — do not mix the two. - Set up the practice sheet. On Practice, put a header in A1 called
Lookup IDand in B1 calledResult. In A2, type one of the Product IDs from your Data sheet. - Write your first VLOOKUP. In B2, type
=VLOOKUP(A2, Data!$A$2:$D$11, 2, FALSE). Press Enter. The formula looks for the value in A2 inside the first column of the range A2:D11 on the Data sheet, and returns the value from column 2 (Product Name). FALSE forces an exact match. - Test the column index. Change the
2to3and then4. Confirm you get Category and Unit Price. This trains you to count columns from the left edge of the range, not from column A of the sheet. - Lock the range. Click inside the formula and press F4 (Windows) or Cmd+T (Mac) on the range reference to cycle to
$A$2:$D$11. Copy B2 down to B5 and change the IDs in A3:A5. The results should stay correct because the range no longer shifts. - Break it on purpose. Delete the dollar signs and copy the formula down two rows. Watch the range slide to A4:D13 and produce wrong or #N/A results. Undo, then re-lock. This is the single most common beginner error.
- Handle a missing ID. Type an ID that does not exist, such as
X999, into A6. The formula returns #N/A. Wrap it:=IFERROR(VLOOKUP(A6, Data!$A$2:$D$11, 2, FALSE), "Not found"). IFERROR is available in Excel 2007 and later and in Google Sheets; older Excel uses IF(ISNA(...)). - Try approximate match. On a new sheet, build a small tax or discount table with numeric thresholds in ascending order (e.g., 0, 100, 500, 1000) and a rate column. Use
=VLOOKUP(250, $A$2:$B$5, 2, TRUE). Approximate match returns the largest value less than or equal to the lookup value, so 250 returns the rate for 100. Sort the first column ascending or results will be wrong. - Look up text instead of numbers. Add a column of product names and use VLOOKUP to find the price by name. If the name contains trailing spaces, the lookup fails; use TRIM on both sides or clean the source data.
- Combine with a drop-down. Select A2:A6 on Practice, open Data > Data Validation (Excel) or Data > Data validation (Sheets), and set the list source to the Product ID column on Data. Now you can switch IDs from a menu and watch the VLOOKUP update.
- Check your work with a second method. In an empty cell, use INDEX and MATCH for the same lookup:
=INDEX(Data!$B$2:$B$11, MATCH(A2, Data!$A$2:$A$11, 0)). If both return the same result, your VLOOKUP is sound and you have learned the more flexible alternative.
Common Mistakes
- Forgetting FALSE. Omitting the fourth argument defaults to approximate match, which returns plausible but wrong answers on unsorted data.
- Counting columns from the sheet, not the range. If your range starts at column B, the return column for C is 2, not 3.
- Relative ranges. Copying a formula without $ signs shifts the table and produces #N/A or wrong values.
- Mismatched types. A number stored as text (often shown with a green triangle in Excel) will not match a real number. Convert with VALUE or Text to Columns.
- Hidden spaces. Trailing spaces in either the lookup value or the table break exact matches. TRIM both sides.
- Duplicate keys. VLOOKUP returns the first match only. If duplicates exist, decide which one is correct or use a different approach.
Tips
- Name your table range (Formulas > Define Name) so formulas read
VLOOKUP(A2, Products, 2, FALSE)— easier to audit. - Keep the lookup column as the leftmost column of the range. VLOOKUP cannot look to the left; use INDEX/MATCH or XLOOKUP if you need that.
- Use a helper column to concatenate keys when you need to match on two fields (e.g., ID & region).
- Press Ctrl+` (grave accent) in Excel to show all formulas at once and spot broken ranges quickly.
- Practice with 10–15 rows, not 1,000. Small data makes errors visible.
Troubleshooting
If you see #N/A, check three things in order: the lookup value exists in the first column of the range, the types match (number vs text), and there are no hidden spaces. If you see #REF!, your column index is larger than the number of columns in the range. If you see #VALUE!, the column index is not a number. If results are wrong but not errors, the fourth argument is probably missing or TRUE. If the formula works in one cell but not when copied, the range is not absolute. If a drop-down shows old values, refresh the validation list source. If nothing works, retype the formula from scratch in a clean cell — invisible characters sometimes survive copy-paste.
Frequently Asked Questions
Do I need Excel, or can I practise in Google Sheets?
Either works. VLOOKUP syntax is identical in Excel, Google Sheets, and LibreOffice Calc. Menu names for data validation and named ranges differ slightly.
Why does VLOOKUP return the wrong row?
Most often the fourth argument is omitted, so approximate match is used on unsorted data. Add FALSE for an exact match.
Can VLOOKUP look to the left?
No. The lookup value must be in the first column of the range. Use INDEX and MATCH, or XLOOKUP in newer Excel versions, to look left.
What does the column index number mean?
It is the position of the column you want, counted from the left edge of the range you supplied, starting at 1.
How do I stop #N/A from showing?
Wrap the formula in IFERROR: =IFERROR(VLOOKUP(...), "Not found"). This replaces any error with your chosen text or blank.
Is VLOOKUP still worth learning?
Yes. It is still widely used in existing spreadsheets and is the fastest way to understand lookup logic. XLOOKUP is more flexible where available, but VLOOKUP remains a core skill.