Excel VLOOKUP practice workbook

Get the VLOOKUP Workbook

Practice file with the final solution included. Try each example yourself and see exactly where the common errors come from.

What is VLOOKUP in Excel?

Imagine you have a big book of names and phone numbers. If you want to find a person’s phone number, you first look for their name, then see the number next to it. VLOOKUP does something similar in Excel but with data.

VLOOKUP means Vertical Lookup. It is one of the most popular functions in Excel.

VLOOKUP Syntax Explained

Before we go further, let’s simplify what VLOOKUP is made of (its syntax) and explain its parts.

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
  • lookup_value: What you want to find.
  • table_array: Where to look for it. The lookup_value should be in the first column of this range.
  • col_index_num: This is the number of the column that has the information you want to get.
  • [range_lookup]: This tells Excel how you want to search. Use FALSE to find an exact match. Use TRUE to find something close if an exact match isn’t there (approximate match). If you don’t choose, Excel will look for an approximate match by default.

How to Use VLOOKUP (Step-by-Step)

  • What You’re Looking For (lookup_value): First, decide what information you need. It might be a product’s ID, someone’s name, or another unique detail.
  • Where to Look (table_array): Choose the part of your Excel sheet that has the information. Make sure it includes both what you’re looking for and what you want to find out.
  • Column Number for Your Answer (col_index_num): In the area you selected, count the columns from where your search starts to where your answer is. Start counting from 1. This number tells Excel in which column your answer will be.
  • Type of Search (range_lookup): Decide if you need the exact information you asked for (use FALSE) or if something close enough is okay (use TRUE). If you don’t choose, Excel will look for something close.

Example: Find a Customer Name with VLOOKUP

Let’s say you have a list of customer IDs in Excel and you need to find the corresponding customer names.

Excel spreadsheet showing a report with customer IDs and an empty column for customer name.

But the customer names are located in a master data list, stored elsewhere in your workbook.

Master data list with customer IDs and customer names used as the VLOOKUP table

This is where you can use VLOOKUP. Click on the cell where you want the name to appear. Let’s say you choose cell D6.

Step 1: Start the VLOOKUP Formula

Let’s say you select cell D6. Begin by typing =VLOOKUP. After you type just a few letters, a list will appear and Excel will offer VLOOKUP as a suggestion. To use this suggestion, press “Tab” on your keyboard.

Typing =VLOOKUP in an Excel cell to start the formula

But don’t press Enter yet! You’ll see Excel is waiting for more information.

Step 2: Set the Lookup Value

Now, Excel wants to know what you’re looking for.

Since we’re looking for the Customer ID in cell C6, you can use the arrow keys on your keyboard to highlight it. Or, you can use the mouse and click on that cell instead.

Next, type a comma “,” (or a semicolon “;” if that’s what your regional settings require) to proceed to the formula’s next argument. So, you’ll get:

=VLOOKUP(C6, 

Step 3: Define the Table Array

Next, you need to tell Excel where to look for the customer ID and its name.

Find the master data list in your workbook, which, in our example, is between cells I3 and J14. Click and drag from I3 to J14 to select the list of company IDs and names. Then, type a comma.

Now, your formula should look like this:

=VLOOKUP(C6, I3:J14, 

❗VLOOKUP always searches vertically: It goes down the first column of the table you specify (in our case the customer ID), searching for the lookup value you’ve given in the formula.

Selecting the table array range I3:J14 in Excel for a VLOOKUP formula

Step 4: Enter the Column Index Number

Next, we need to show Excel where to find the customer name.

When using VLOOKUP, think of each column in the table array as having a number, starting from 1.

VLOOKUP table array with column numbers 1 and 2 above Customer ID and Customer Name

❗VLOOKUP only looks right: The value it finds and returns (in our case the customer name) must always be in a column to the right of the first column it searches through.

In our example, customer name is in the second column of our table. So, after the last comma, type the number 2, then add another comma. Now, your formula will look like this:

=VLOOKUP(C6, I3:J14, 2, 

Step 5: Choose Exact or Approximate Match

VLOOKUP provides two ways to search: exact match and approximate match. Most often, you’ll prefer the exact match, especially for finding unique identifiers such as customer IDs or product numbers.

In our example, we choose “False” for an exact match. Because this is the final part of the formula, we close it with parentheses. Your formula should now look like this:

=VLOOKUP(C6, I3:J14, 2, FALSE)

💡 You can use zero (0) for an exact match and one (1) for an approximate match. Excel interprets 0 as FALSE and 1 as TRUE, making 0 and 1 simpler alternatives.

Once you press Enter, VLOOKUP will find the correct customer name (in our case, “Voltage”).

VLOOKUP formula returning the customer name "Voltage" in Excel

In short, VLOOKUP first looks down the first column. When it finds the customer ID “4706” (lookup_value), it goes to the second column (col_index_num) to get the customer name.

How VLOOKUP searches vertically and returns a value from the second column

Step 6: Lock Cell References with Absolute References

This step is optional, but in our case, we plan to copy the VLOOKUP formula into the cells below. But if we just copy the formula from cell D6 and paste it into cells D7 and D8, we’ll end up with a “#N/A” error in D8:

#N/A error in Excel caused by copying VLOOKUP without locking the table array

Select cell D8 and press F2 to edit the formula. You’ll notice that when the formula was copied and pasted, the table array moved down too.

Now, the range has changed from I3:J14 to I5:J16.

This means that the customer number 4731 is no longer within the search range of the formula, resulting in the error.

VLOOKUP table array shifting down after copy-paste, causing a range error

To avoid this, we need to lock the cell referencing in D6 before we copy it to the cells below.

To fix this, go to cell D6 and hit F2 to edit. Inside the formula, move your cursor to the start of the table array (here, it’s I3) and press F4. This action adds “$” signs to the range, making it absolute.

Using F4 to add absolute cell references ($) to a VLOOKUP table array in Excel

Then, move your cursor to the end of the table array (here, it’s J14) and press F4 again. This converts the cell references to absolute, ensuring they stay the same when copied.

Your formula should look like this:

=VLOOKUP(C6, $I$3:$J$14, 2, FALSE)

With these changes, you can now copy the formula from D6 and paste it into D7 and D8 without issues. VLOOKUP will then give you the accurate results.

VLOOKUP formula copied correctly across multiple rows using absolute references

To understand better how cell referencing works correctly in Excel, including the meaning and use of the Dollar Sign, you can read more in this article here.

VLOOKUP with Approximate Match

Exact match is what you need most of the time. But sometimes you’re not looking for one exact value. You’re looking for the band a value falls into, like a grade for a test score or a discount for an order size.

Say you have a grade table with the lowest score for each grade:

ScoreGrade
0F
50D
60C
70B
80A

To find the grade for a score in B2, use TRUE (or 1) as the last argument:

=VLOOKUP(B2, $E$2:$F$6, 2, TRUE)

A score of 74 returns B. VLOOKUP doesn’t find 74 in the list, so it takes the largest value that’s smaller than or equal to it.

Here that’s 70.

Why Sorting Matters for Approximate Match

Approximate match only works when the first column is sorted from smallest to largest. If it isn’t, VLOOKUP doesn’t show an error. It just returns the wrong grade. That’s what makes it dangerous.

So before you use TRUE, sort the first column in ascending order. If you can’t sort it, use exact match instead.

How to VLOOKUP from Another Sheet

Your lookup table doesn’t have to be on the same sheet. In real reports it usually isn’t.

Start the formula as usual. When you get to the table_array, click the other sheet’s tab and select the range there. Excel adds the sheet name for you:

=VLOOKUP(C6, Customers!$A$2:$B$13, 2, FALSE)

The exclamation mark separates the sheet name from the range. If the sheet name has a space in it, Excel wraps the name in single quotes:

=VLOOKUP(C6, 'Customer List'!$A$2:$B$13, 2, FALSE)

Lock the range with F4 before you copy the formula down, just like before.

Common VLOOKUP Errors and How to Fix Them

How to Fix #N/A Errors in VLOOKUP

These errors happen if VLOOKUP can’t find the lookup_value within your specified range.

Check for typos and extra spaces (TRIM removes them). Make sure you used FALSE for an exact match. And lock the table array with F4 before you copy the formula down.

Fix #N/A Caused by Extra Spaces

Sometimes VLOOKUP returns #N/A even though you can see the value in the table. The usual cause is an extra space. “4706 “ with a space at the end isn’t the same as “4706” to Excel.

If the extra space is in your lookup value, clean it inside the formula with TRIM:

=VLOOKUP(TRIM(C6), $I$3:$J$14, 2, FALSE)

If the spaces are in the lookup table, add a helper column with TRIM next to the original column, then copy it and paste it back as values. TRIM removes spaces at the start and end, and turns double spaces between words into single ones.

Replace #N/A with IFNA or IFERROR

A column full of #N/A errors looks broken, even when it simply means “not in the list”.

Wrap your VLOOKUP in IFNA to show a message instead:

=IFNA(VLOOKUP(C6, $I$3:$J$14, 2, FALSE), "Not found")

IFERROR works the same way, but it catches every error type, not just #N/A:

=IFERROR(VLOOKUP(C6, $I$3:$J$14, 2, FALSE), "Not found")

I prefer IFNA for lookups. IFERROR also hides real problems, like a #REF! after someone deletes a column, and you’d never notice. IFNA works in Excel 2013 and later.

Why VLOOKUP Returns the Wrong Value

Keep in mind, VLOOKUP defaults to an approximate search if not specified differently. Skipping the optional “range_lookup” argument means VLOOKUP assumes it’s TRUE, for an approximate match.

For precise searches, this default behavior might cause unforeseen errors and outcomes. Therefore, it’s wise to always define a value for range_lookup, usually FALSE or 0.

If you do want an approximate match, sort the first column in ascending order, or the results will be wrong.

VLOOKUP Only Returns the First Match

VLOOKUP has a limitation when dealing with tables that have duplicate entries. It can only return the first record that matches your search. This means if your table has several entries for the same lookup value, VLOOKUP will only show you the first one it finds, not any of the others.

To overcome the limitation of VLOOKUP with duplicates, the modern XLOOKUP function is a stronger alternative for Microsoft 365 and Excel 2021+. XLOOKUP defaults to exact match, searches in any direction, and handles “last match” cases that trip up VLOOKUP.

For those without access to XLOOKUP, combining INDEX and MATCH functions is another strong solution, providing flexibility in searching and retrieving data from tables with duplicates.

If you specifically need to return all matching rows instead of just the first, see our guide covering FILTER, GROUPBY, INDEX+AGGREGATE, and TEXTJOIN. It’s the most-asked follow-up question after a VLOOKUP returns the wrong duplicate.

VLOOKUP vs XLOOKUP: Which Should You Use in 2026?

VLOOKUP has been the go-to lookup function for decades. In 2019, Microsoft introduced XLOOKUP.

Both work in Microsoft 365 today, and VLOOKUP still works in every Excel version.

So which one should you use? It depends on your Excel version and what you need the formula to do.

Here’s a quick comparison:

 VLOOKUPXLOOKUP
Search directionRight onlyLeft, right, up, or down
Default match typeApproximate (can return wrong results if you forget FALSE)Exact match (safer by default)
Error handlingRequires wrapping in IFERROR or IFNABuilt-in if_not_found argument
Column indexUses a number that breaks if you insert or delete columnsUses a return range that stays stable
Multiple return valuesNoYes (returns multiple columns in one formula)
AvailabilityAll Excel versions + Google SheetsExcel 2021+, Microsoft 365, Google Sheets

When to Use VLOOKUP

Use VLOOKUP if any of these apply:

  • You share files with people on Excel 2019 or earlier. XLOOKUP will show a #NAME? error in those versions.
  • You’re working in an environment with legacy spreadsheets that already use VLOOKUP. No need to rewrite formulas that work.
  • You’re learning Excel for the first time and want to start with the simpler syntax. VLOOKUP has four arguments. XLOOKUP has six.

VLOOKUP still works perfectly for straightforward left-to-right lookups with exact match. It’s not broken. It’s just limited.

When to Use XLOOKUP Instead

Use XLOOKUP if you have access to it (Excel 2021, Microsoft 365, or Google Sheets). It’s the better choice in most situations because:

  • It searches in any direction. Need to return a value from a column to the left of your lookup column? VLOOKUP can’t do that. XLOOKUP can.
  • It won’t break when you insert columns. VLOOKUP uses a column index number (like 3). Insert a new column and that number is now wrong. XLOOKUP references the actual return range, so it stays accurate.
  • Exact match is the default. With VLOOKUP, forgetting to type FALSE gives you an approximate match, which often returns the wrong result silently. XLOOKUP defaults to exact match. One less mistake to worry about.
  • Built-in error handling. Instead of wrapping your formula in IFERROR, you can add a custom “not found” message directly: =XLOOKUP(A2, D:D, E:E, "Not found")

Bottom line: If everyone who uses your file has Excel 2021 or Microsoft 365, use XLOOKUP. If you need backward compatibility, stick with VLOOKUP or keep both in your toolkit.

Want to go deeper? Read our full XLOOKUP vs VLOOKUP comparison with side-by-side examples.

Advanced VLOOKUP Techniques

Once you’re comfortable with basic VLOOKUP, there’s more you can do with it:

  • Wildcard lookups to find partial matches (using * and ?)
  • VLOOKUP with IFERROR to handle missing values gracefully
  • Combining VLOOKUP with math operations to multiply or divide results on the fly
  • VLOOKUP across multiple sheets to pull data from different tabs in the same workbook

We cover all of these with step-by-step examples in our VLOOKUP and HLOOKUP advanced guide.

Download the Practice File

Download the VLOOKUP Workbook

Every example from the video, plus the solution to check your answers.

Frequently Asked Questions

What does VLOOKUP do in Excel?

VLOOKUP searches for a value in the first column of a table and returns a value from another column in the same row. The syntax is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]).

Why does my VLOOKUP return #N/A?

VLOOKUP could not find the lookup value in the first column of the table. Check for typos and extra spaces, which TRIM removes. Make sure the table range did not shift when you copied the formula, and lock it with F4 before copying.

How do I use VLOOKUP with another sheet?

Start the formula as usual. When you get to the table array, click the other sheet tab and select the range. Excel adds the sheet name and an exclamation mark, for example Customers!$A$2:$B$13.

What is the difference between exact match and approximate match in VLOOKUP?

FALSE or 0 finds only the exact value. TRUE or 1 finds the largest value that is less than or equal to the lookup value, and needs the first column sorted in ascending order. If you leave the argument out, VLOOKUP uses approximate match.

Can VLOOKUP look to the left?

No. VLOOKUP can only return values from columns to the right of the lookup column. To look to the left, use XLOOKUP in Microsoft 365 or Excel 2021 and later, or INDEX and MATCH in any version.

Should I use VLOOKUP or XLOOKUP?

Use XLOOKUP if everyone who opens the file has Microsoft 365 or Excel 2021 or later. It defaults to exact match and can look in any direction. Use VLOOKUP when the file is shared with people on Excel 2019 or earlier.

Leila Gharani

Founder of XelPlus and ten-time Microsoft MVP. Leila helps over 500,000 professionals master Excel, Power BI, and data automation through practical, real-world training.