VLOOKUP function in Excel (2024)

Exact Match | Approximate Match | Vlookup Looks Right | First Match | Partial Match | Vlookup is Case-insensitive | Multiple Criteria | #N/A error | Multiple Lookup Tables | Index and Match | Table Magic | Xlookup

The VLOOKUP function is one of the most popular functions in Excel. This page contains many easy to follow VLOOKUP examples.

Exact Match

Most of the time you are looking for an exact match when you use the VLOOKUP function in Excel. Let's take a look at the arguments of the VLOOKUP function.

1. The VLOOKUP function below looks up the value 53 (first argument) in the leftmost column of the red table (second argument).

VLOOKUP function in Excel (1)

2. The value 4 (third argument) tells the VLOOKUP function to return the value in the same row from the fourth column of the red table.

VLOOKUP function in Excel (2)

Note: the Boolean FALSE (fourth argument) tells the VLOOKUP function to return an exact match. If the VLOOKUP function cannot find the value 53 in the first column, it will return a #N/A error.

3. Here's another example. Instead of returning the salary, the VLOOKUP function below returns the last name (third argument is set to 3) of ID 79.

VLOOKUP function in Excel (3)

Approximate Match

Let's take a look at an example of the VLOOKUP function in approximate match mode (fourth argument set to TRUE).

1. The VLOOKUP function below looks up the value 85 (first argument) in the leftmost column of the red table (second argument). There's just one problem. There's no value 85 in the first column.

VLOOKUP function in Excel (4)

2. Fortunately, the Boolean TRUE (fourth argument) tells the VLOOKUP function to return an approximate match. If the VLOOKUP function cannot find the value 85 in the first column, it will return the largest value smaller than 85. In this example, this will be the value 80.

VLOOKUP function in Excel (5)

3. The value 2 (third argument) tells the VLOOKUP function to return the value in the same row from the second column of the red table.

VLOOKUP function in Excel (6)

Note: always sort the leftmost column of the red table in ascending order if you use the VLOOKUP function in approximate match mode (fourth argument set to TRUE).

Vlookup Looks Right

The VLOOKUP function always looks up a value in the leftmost column of a table and returns the corresponding value from a column to the right.

1. For example, the VLOOKUP function below looks up the first name and returns the last name.

VLOOKUP function in Excel (7)

2. If you change the column index number (third argument) to 3, the VLOOKUP function looks up the first name and returns the salary.

VLOOKUP function in Excel (8)

Note: in this example, the VLOOKUP function cannot lookup the first name and return the ID. The VLOOKUP function only looks to the right. No worries, you can use INDEX and MATCH in Excel to perform a left lookup.

First Match

If the leftmost column of the table contains duplicates, the VLOOKUP function matches the first instance. For example, take a look at the VLOOKUP function below.

VLOOKUP function in Excel (9)

Explanation: the VLOOKUP function returns the salary of Mia Clark, not Mia Reed.

Partial Match

The VLOOKUP function supports wildcards for partial matches. For example, take a look at the VLOOKUP function below.

VLOOKUP function in Excel (10)

Explanation: an asterisk (*) matches zero or more characters. The VLOOKUP function matches the first instance that begins with "Jess". Use "*"&G2 for an "ends with" match. Use "*"&G2&"*" for a "contains" match.

Vlookup is Case-insensitive

The VLOOKUP function in Excel performs a case-insensitive lookup. For example, the VLOOKUP function below looks up MIA (cell G2) in the leftmost column of the table.

VLOOKUP function in Excel (11)

Explanation: the VLOOKUP function is case-insensitive so it looks up MIA or Mia or mia or miA, etc. As a result, the VLOOKUP function returns the salary of Mia Clark (first instance). Use INDEX, MATCH and EXACT in Excel to perform a case-sensitive lookup.

Multiple Criteria

Do you want to look up a value based on multiple criteria? Use INDEX and MATCH in Excel to perform a two-column lookup.

VLOOKUP function in Excel (12)

Note: the array formula above looks up the salary of James Clark, not James Smith, not James Anderson.

#N/A error

If the VLOOKUP function cannot find a match, it returns a #N/A error.

1. For example, the VLOOKUP function below cannot find the value 28 in the leftmost column.

VLOOKUP function in Excel (13)

2. If you like, you can use the IFNA function to replace the #N/A error with a friendly message.

VLOOKUP function in Excel (14)

Note: the IFNA function was introduced in Excel 2013. If you're using Excel 2010 or Excel 2007, combine IF and ISNA or use IFERROR.

Multiple Lookup Tables

When using the VLOOKUP function in Excel, you can have multiple lookup tables. You can use the IF function to check whether a condition is met, and return one lookup table if TRUE and another lookup table if FALSE.

1. Create two named ranges: Table1 and Table2.

VLOOKUP function in Excel (15)

2. Select cell E4 and enter the VLOOKUP function shown below.

VLOOKUP function in Excel (16)

Explanation: the bonus depends on the market (UK or USA) and the sales amount. The second argument of the VLOOKUP function does the trick. If UK, the VLOOKUP function uses Table1, if USA, the VLOOKUP function uses Table2. Set the fourth argument of the VLOOKUP function to TRUE to return an approximate match.

3. Press Enter.

4. Select cell E4, click on the lower right corner of cell E4 and drag it down to cell E10.

VLOOKUP function in Excel (17)

Note: for example, Walker receives a bonus of $1,500. Because we're using named ranges, we can easily copy this VLOOKUP function to the other cells without worrying about cell references.

Index and Match

Instead of using VLOOKUP, use INDEX and MATCH. To perform advanced lookups, you'll need INDEX and MATCH. Maybe this is one step too far for you at this stage, but it shows you one of the many other powerful formulas Excel has to offer.

VLOOKUP function in Excel (18)

Table Magic

Tables can make VLOOKUP formulas a lot easier. In the example below, a single VLOOKUP function automatically looks up all country codes.

VLOOKUP function in Excel (19)

Note: visit our page about merging tables to learn how to create this VLOOKUP function and bring your Excel game to a new level.

Xlookup

If you have Excel 365 or Excel 2021, use XLOOKUP instead of VLOOKUP. The XLOOKUP function is easier to use and has some additional advantages.

VLOOKUP function in Excel (20)

VLOOKUP function in Excel (2024)

FAQs

How do you use VLOOKUP in Excel? ›

In its simplest form, the VLOOKUP function says: =VLOOKUP(What you want to look up, where you want to look for it, the column number in the range containing the value to return, return an Approximate or Exact match – indicated as 1/TRUE, or 0/FALSE).

What is the VLOOKUP formula for in Excel? ›

VLOOKUP is a powerful function in Excel that searches for a value in the first column of a range (table or array) and returns a corresponding value in the same row from a specified column. The "V" in VLOOKUP stands for "Vertical," indicating that it searches vertically (downward) in a table.

How to do VLOOKUP in Excel for dummies? ›

To easily use VLOOKUP in Excel follow these simple steps:
  1. Step 1: Organize your data for VLOOKUP. ...
  2. Step 2: Set the Lookup Value. ...
  3. Step 3: Specify where to search. ...
  4. Step 4: Specify which information you need. ...
  5. Step 5: Choose between Exact or approximate match.

How to do a VLOOKUP if formula? ›

Build the VLOOKUP formula:
  1. Enter =VLOOKUP in cell G4, where you want to see if a Product is in Stock or not.
  2. Enter the Lookup value F4, which contains the Product (Banana) you want to look for.
  3. Enter the Search range B$4:D$7, the range of data that contains all the Product and Amount values.

What are the three rules for VLOOKUP? ›

The VLOOKUP function consists of three required arguments, in the following order: lookup value, table array, and column index number. The lookup value is the value for which you want to find matching data and must appear in the first column of the lookup table; it can be a value, a text string, or a cell reference.

How to use VLOOKUP sheet? ›

How to use VLOOKUP in Google Sheets
  1. Organize your data. Enter your data into a spreadsheet or locate an existing table. ...
  2. Select an output cell. ...
  3. Enter the VLOOKUP function. ...
  4. Enter the search_key. ...
  5. Set the value range. ...
  6. Set the index column. ...
  7. Determine is_sorted value. ...
  8. Execute the function.
Aug 28, 2023

How to use VLOOKUP to find matches from another sheet? ›

  1. VLOOKUP from another sheet step 1: Identify the common field.
  2. Step 2: Select the range of data.
  3. VLOOKUP from another sheet step 3: Enter the VLOOKUP function.
  4. Step 4: Check the result.
  5. How to get more data from another sheet than VLOOKUP.
  6. Using VLOOKUP in two Excel sheets FAQ.
Apr 21, 2023

What is the fastest way to VLOOKUP in Excel? ›

Approximate-match VLOOKUP is very fast

With very large sets of data, changing to approximate-match VLOOKUP can mean a dramatic speed increase. This is because VLOOKUP will assume data is sorted and use a different algorithm to speed up searching, sometimes called a binary search.

What formula can I use instead of VLOOKUP in Excel? ›

What is INDEX MATCH? The superior alternative to VLOOKUP is INDEX MATCH. While VLOOKUP works fine in most cases, it tends to reveal flaws when you start using it in large and complex sheets. The INDEX MATCH formula is actually two different functions; INDEX and MATCH.

Is learning VLOOKUP easy? ›

VLOOKUP is an extremely useful tool, and learning how to use it is easier than you think! Before you start, you should understand the basics of functions. Check out our Functions lesson from our Excel Formulas tutorial (or select a specific version of Excel).

How to use VLOOKUP in Excel to compare two columns? ›

The formula in Excel to compare two columns using VLOOKUP is as follows. VLOOKUP(A2,..,..,..) – takes the value in cell A2. VLOOKUP(A2, $B$2:$B$5,..,..) – compares with all the values in cells from B2 to B5. That's why the cells in the range B2:B5 are locked using absolute reference.

How do you lookup a value in a column and return the value of another column in Excel? ›

Select 'Function' (Fx) > VLOOKUP and insert this formula into your highlighted cell. Enter the lookup value for which you want to retrieve new data. Enter the table array of the spreadsheet where your desired data is located. Enter the column number of the data you want Excel to return.

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 5307

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.