Excel VLOOKUP tutorial for beginners - syntax and formula examples

This article begins a series covering one of the most useful Excel functions - VLOOKUP. At the same time, it's one of the most intricate and least understood.

In this VLOOKUP tutorial, I will try to explain the basics in a very plain language to make the learning curve for an inexperienced user as easy as possible. We will also explore some formula examples that address the most common usages of VLOOKUP in Excel.

Excel VLOOKUP function - syntax and basic uses

So what is VLOOKUP? To begin with, it is an Excel function : ) What does it do? It searches for the value you specify and returns a matching value from another column. More technically, the VLOOKUP function looks up a value in the first column of the specified range of cells, and returns a value in the same row from another column.

In its common usage, Excel VLOOKUP searches through your lists of data based on the unique identifier and brings you a piece of information associated with that unique identifier.

The letter "V" in VLOOKUP stands for "vertical". It is used to differentiate VLOOKUP from the HLOOKUP function that looks up a value in the top row of an array (H stands for "horizontal").

The VLOOKUP function is available in all versions of Excel 2013, Excel 2010, Excel 2007, Excel 2003, Excel XP and Excel 2000.

Excel VLOOKUP syntax

The syntax for the VLOOKUP function is as follows:

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

As you see, the Microsoft Excel VLOOKUP function has 4 parameters, or arguments. The first three parameters are requited, the last one is optional.

  1. lookup_value is the value to search for.

    This can be either a value (number, date or text) or a cell reference (reference to a cell containing a lookup value), or the value returned by some other Excel function. For example:

    • Look up for number: =VLOOKUP(40, A2:B15, 2) - the formula will search for the number 40.
    • Look up for text: =VLOOKUP("apples", A2:B15, 2) - the formula will search for the text "apples". Please pay attention that you always enclose text values in "double quotes".
    • Look up for value in another cell: =VLOOKUP(C2, A2:B15, 2) - the formula will search for the value in cell C2.
  2. table_array is two or more columns of data.

    Remember, the VLOOKUP function always searches for the lookup value in the first column of table_array. Your table_array may contain various values such as text, dates, numbers, or logical values. Values are case-insensitive, meaning that uppercase and lowercase text are treated as identical.

    So, our formula =VLOOKUP(40, A2:B15,2) will search for "40" in cells A2 to A15 because A is the first column of the table_array A2:B15. Hopefully, everything is clear so far : )

  3. col_index_num is the column number in table_array from which the value in the corresponding row should be returned.

    The left-most column in the specified table_array is 1, the second column is 2, the third column is 3, and so on.

    Well, now you can read the entire formula =VLOOKUP(40, A2:B15,2). The formula searches for "40" in cells A2 through A15 and returns a matching value from column B (because B is the 2nd column in the specified table_array A2:B15).
    Excel VLOOOKUP function

  4. range_lookup determines whether you are looking for an exact match (FALSE) or approximate match (TRUE or omitted). This final parameter is optional but very important. Further on in this VLOOKUP tutorial, you will find a few formula examples to Vlookup with exact or approximate match.

Excel VLOOKUP examples

I hope the VLOOKUP function is starting to look a bit more familiar to you. Now let's explore a few examples of using VLOOKUP formulas on real data.

How to do vlookup in Excel from another worksheet

In practice, VLOOKUP formulas are rarely used to find data in the same worksheet. Most often you will have to look up and pull the matching data from a different sheet.

To do Vlookup from a different Excel sheet, you should enter the worksheet's name and an exclamation mark in the table_array argument before the range of cells, e.g. =VLOOKUP(40, Sheet2!A2:B15,2). The formula indicates that the lookup range A2:B15 is located in Sheet2.

Of course, you don't have to type the sheet's name manually. Simply start typing the formula and when it comes to the table_array argument, switch to the lookup worksheet and select the range using a mouse.

The formula you see in the screenshot below searches for the text "Product 1" in column A (the 1st column of the lookup range A2:B9) in the Prices worksheet:

=VLOOKUP("Product 1",Prices!$A$2:$B$9,2,FALSE)
A VLOOKUP formula to search in another worksheet

Tip. It is a good idea to always use absolute cell references (with the $ sign) in the table_array argument. This will prevent the lookup range from changing when you copy your Vlookup formula to other cells.

How to do vlookup from a different workbook

To perform vlookup between two different Excel workbooks, you should supply the workbook's name in square brackets before the worksheet's name.

For example, the below formula will look up value "40" in Sheet2 of the Numbers.xlsx workbook:


If either a workbook name or worksheet name contains spaces or non-alphabetical characters, you should enclose them in 'single quotes' like this:


The easiest way to make a VLOOKUP formula that refers to another workbook is this:

  1. Open both workbooks. This step is not obligatory, but makes it easier to write a formula because you won't have to type the workbook's name manually, thus preventing misprints.
  2. Start typing your VLOOKUP formula, and for the table_array argument, switch to the other workbook and select the lookup range there.

In the formula you see in the screenshot below, the lookup workbook is PriceList.xlsx and the lookup worksheet is Prices.
A VLOOKUP formula to search in a different worksheet

Once you close the workbook with your lookup table, your VLOOKUP formula will work anyway, but it will display the full path for the lookup workbook, as shown below:
When the lookup workbook is closed, the formula shows the full path to it.

For more information, please see How to refer to another Excel sheet or workbook.

How to use a named range or table in VLOOKUP formulas

If you are supposed to use the same lookup range in several VLOOKUP formulas, you can created a named range for it and type the name directly in the table_array argument of your Vlookup formula.

To create a named range, just select the cells and type any name in the Name box, to the left of the Formula bar.
Creating a named bar in Excel

And now you can write the following VLOOKUP formula to get Product 1's price:

=VLOOKUP("Product 1",Products,2)

Most range names in Excel apply to the entire workbook, so you don't need to specify the worksheet's name, even if your lookup range resides in a different worksheet. If it is in another workbook, you have to put the workbook's name before the named range, for example:

=VLOOKUP("Product 1",PriceList.xlsx!Products,2)

Such formulas are far more understandable, aren't they? Besides, using named ranges can be a good alternative to absolute cell references. Since a named range doesn't change when a formula is copied to other cells, you can be sure that your lookup range will always remain correct.

If you have converted a range of cells into a fully-functional Excel table (Insert tab > Table), then you can select the lookup range using a mouse, and Microsoft Excel will automatically add the columns' names or the table name to the formula:
Using a table name in a VLOOKUP formula

The complete formula may look similar to this:

=VLOOKUP("Product 1",Table46[[Product]:[Price]],2)

or even =VLOOKUP("Product 1",Table46,2).

As well as named ranges, columns names are constant and your cell references won't change no matter where the VLOOKUP formula is copied within the same workbook.

Using wildcard characters in VLOOKUP formulas

As well as in many other formulas, you can use the following wildcard characters in the Excel VLOOKUP function:

  • Question mark (?) to match any single character, and
  • Asterisk (*) to match any sequence of characters.

Using wildcard chars in your VLOOKUP formulas may prove really useful in many cases:

  • When you do not remember the exact text you are looking for.
  • When you want to find some word that is part of the cell's contents. Be aware that the VLOOKUP function searches by the entire content of a cell, as if you selected the option "Match entire cell content" in the standard Excel Find dialog.
  • When a lookup column contains extra leading or trailing spaces. If it is the case, you may rack your brain trying to figure out why the normal formula does not work.

Example 1. Look up text starting or ending with certain characters

Suppose, you want to find a certain customer in the below database. You cannot remember his surname, but you know it starts with "ack". So, the following VLOOKUP formula will work a treat:


A VLOOKUP formula based on cell's value

Once you are sure you've found the correct name, you can use a similar VLOOKUP formula to get the sum paid by that customer. You only have to change the 3rd parameter in the formula to the appropriate column number, column C (3) in our case:


Here a few more examples of VLOOKUP formulas with wildcard characters:

=VLOOKUP("*man",$A$2:$C$11,1,FALSE) - find the name ending with "man".

=VLOOKUP("ad*son",$A$2:$C$11,1,FALSE) - find the name starting with "ad" and ending with "son".

=VLOOKUP("?????",$A$2:$C$11,1,FALSE) - find a 5-character last name.

Note. For a wildcard VLOOKUP formula to work correctly, you always have to add FALSE as the last parameter. If your lookup range contains more than one entry that meets the wildcard criteria, the first found value will be returned.

Example 2. Wildcard VLOOKUP formulas based on cell's value

And now let's discuss a bit more complex example of how to do a vlookup on the value in some cell. Suppose, you have license keys in column A and license names in column B. You also have part (a few characters) of some license key in cell C1 and you want to find a matching License Name.

This can be done using a VLOOKUP formula like this:


This formula searches for the value in C1 through the specified range and returns a corresponding value in column B. Please notice that we use an ampersand (&) before and after a cell reference in the 1st parameter to concatenate a text string.

As you can see in the screenshot below, my VLOOKUP function returns "Jeremy Hill" because his license key contains the group of chars stated in cell C1:
vlookup wildcard

Also, please pay attention to the table_array argument in screenshot above. It contains the table name ("Table7") instead of a range of cells, as we discussed in the example above.

Excel VLOOKUP with exact or approximate match

And finally, let's have a closer look at the last argument of the Excel VLOOKUP function, range_lookup. Though optional, this parameter is highly important because you are likely to get different results depending on whether you supply TRUE or FALSE to the same formula.

For starters, let's see what Microsoft Excel actually means by "exact match" and "approximate match".

Excel Vlookup with exact match

If range_lookup is set to FALSE, the formula searches for a value exactly the same as lookup_value. If there are two or more values that match the lookup value exactly, the 1st value found is returned. If an exact match is not found, the #N/A error is returned.

For example, if you use the formula =VLOOKUP(4, A2:B15,2,FALSE), but value 4 is not found in cells A2 through A15, the formula will return #N/A.

Excel Vlookup with approximate match

If range_lookup is set to TRUE or omitted, the formula will look up the closest match. More precisely, a VLOOKUP formula searches for an exact match first, but if an exact match is not found, it returns the nearest match, which is the next largest value that is less than lookup_value.

Important note! Vlookup with approximate match requires the values in the first column of table_array to be sorted in ascending order, i.e. from smallest to largest. Otherwise, the Excel VLOOKUP function may not find the correct value.

To better understand the difference between exact match and approximate match, let's make a few more VLOOKUP formulas and see what results they return.

Example 1. How to do a vlookup in Excel with exact match

As you remember, to search for exact match, you have to put FALSE as the final argument in a VLOOKUP formula in Excel.

Let's take the Animal speed table from the very first example again and find out which animal can run 50 miles per hour. I believe you won't have any difficulties with figuring out the formula:




Where E1 is the value to look up.

A VLOOKUP formula with exact match

Please note, our lookup range (column A) contains two "50" values in cells A5 and A6; and the formula returns a value from cell B5. Why is that? Because the VLOOKUP function with exact match returns the 1st found value that matches the lookup value.

Example 2. How to Vlookup with approximate match

When using VLOOKUP formulas with approximate match, i.e. with range_lookup set to TRUE or omitted, the first thing you need to do is sort the first column in your table_array in ascending order.

This is very important because your VLOOKUP formula will stop searching as soon as it finds the nearest match smaller than lookup_value. If you neglect to sort your data properly, you will end up having really strange results or the #N/A error.
Sort the 1st column in the table_array in ascending order.

And now you can go with one of the following formulas:




Where E1 is the lookup value.

As an example, let's find the animal whose speed is closest to 69 mph. And here's what the VLOOKUP formula has come up with:
A VLOOKUP formula with approximate match

As you see, the formula returns "Antelope" whose speed is 61mph, while we also have Cheetah that runs 70 mile per hour, and 70 is much closer to 69 than 61. So, why does Vlookup return "Antelope"? Because VLOOKUP with approximate match retrieves the closest value that is less than the lookup value.

Hopefully, these examples have shed some light on using VLOOKUP in Excel and this function is not alien to you any longer. Now it may be a good idea to revise the essentials to remember the key points better.

Excel VLOOKUP - things to remember!

  1. Excel VLOOKUP function cannot look at its left. It always searches for the lookup value in the left-most column of the lookup range (table_array).
  2. In VLOOKUP formulas, all values are case-insensitive, meaning that uppercase and lowercase characters are treated as equivalent.
  3. If the lookup value is smaller than the smallest value in the first column of table_array, the VLOOKUP function returns the #N/A error.
  4. If the 3rd parameter (col_index_num) is less than 1, the VLOOKUP formula will return the #VALUE! error. In case it is greater than the number of columns in table_array, the formula will return the #REF! error.
  5. Always use absolute cell references (with the $ sign) for the table_array argument to prevent it from changing when copying your Vlookup formula to other cells.
  6. When searching with approximate match (range_lookup set to TRUE or omitted), always have the data in the first column of table_array sorted in ascending order.
  7. And finally, remember about the importance of the last parameter. Supply TRUE for approximate match or FALSE for exact match, and it will save you a lot of headache.

Vlookup Wizard for Excel - easy way to write complex formulas

Undoubtedly, Vlookup is one of the most powerful and useful Excel functions, but it's also one of the most confusing ones. To make the learning curve less steep, embrace the Vlookup Wizard included with of our Ultimate Suite for Excel.

The interactive wizard will walk you through the configuration options to make your own Vlookup formula based on the criteria you specify. Here's how:

  1. Select any cell in your main table, and click the Vlookup Wizard button on the Ablebits Data tab, in the Merge group.
    Vlookup Wizard for Excel
  2. The Vlookup Wizard will show up and ask you to choose your main table and lookup table. Additionally, you specify the following 3 columns:
    • Key column - the column in your main table containing the values to look up.
    • Lookup column - the column to look up against.
    • Return column - the column from which to retrieve values.

    On a simple dataset, the wizard picks the column automatically based on the column headers. When you hover over a certain box on the right-hand pane, the corresponding element on the left-side diagram gets highlighted so you better understand what the wizard is doing:
    The interactive wizard to do vlookup in Excel

  3. When finished, click the Insert button. This will insert the formula into all cells of your main table:
    A Vlookup formula is inserted into all cells of the main table.

That was easy, wasn't it?


  • The Back up the worksheet option is selected by default, so you may not worry about the safety of your original data.
  • Due to the proper use of relative and absolute cells references, the formulas can be copied or moved to any column, without you having to update the references.

What else can our wizard do that the standard Excel VLOOKUP cannot? It can vlookup values from right to left!

Left lookup in Excel made easy

As you already know, the Excel VLOOKUP function can only search in the leftmost column of a table. But sometimes you do need to pull values from left. To have it done, use an INDEX MATCH formula that does not care whether your lookup column is on the right or left side of the return column, or have our wizard build such a formula for you automatically :)

Here's an example of a right-to-left lookup in Excel:
Left lookup in Excel

Want to give it a try? A free 14-day trial version of the Ultimate Suite can be downloaded here.

Merge Tables Wizard - quick and easy alternative for Excel VLOOKUP

If your Excel files are enormously large and complex, the project's deadline is imminent, and you are looking for someone who can lend you a helping hand, try out the Merge Tables Wizard.

This tool is our visual and stress-free alternative to Excel's VLOOKUP function. You do not have to invest hours to learn how to use it - the smart wizard will walk you through these 4 easy steps:

  1. Select your main table.
  2. Select the lookup table.
  3. Choose one or several common columns as the unique identifier.
  4. Define whether you want to update values in existing columns or/and add new columns to the end of the table.

Allow the Merge Tables Wizard a few seconds for processing… and here you go:
Merging matching rows from 2 tables using the Merge Tables Wizard

If this looks like a tool that may be helpful in your work, you are welcome to download a trial version.

If you like any of our tools decide to get a license, don't miss the 15% off coupon code that we've created especially for our blog readers: AB14-BlogSpo

In the next part of our Excel VLOOKUP tutorial we will explore more advanced examples such as performing various calculations with VLOOKUP, extracting values from several columns and more. I thank you for reading and hope to see you next week!

You may also be interested in:

156 Responses to "Excel VLOOKUP tutorial for beginners - syntax and formula examples"

  1. Lisa H says:

    I've solved it, realised should be TRUE instead of FALSE thanks anyway

  2. Scott B says:

    I knew there had to be a way to look up one cell and then return a neighboring cell, and I found it here. Thank you so much for this simple tutorial, it saved me a ton of time!

  3. suhendra says:

    I think you are point 7 inverted.

    7. And finally, remember about the importance of the last parameter. Supply TRUE for exact match or FALSE for approximate match, and it will save you a lot of headache.

  4. Margaret says:

    I can't get my Vlookup to work. I used the same formula last year with no issues. I have excel 2016. I have 2 sheets in one workbook and here is my formula
    =VLOOKUP(A2,'Pay Register Total'!A$2:F$1762,6,FALSE)
    The formula returns #N/A on every line.

    I have the same data, supplier number, in the first column on both sheets.

    Please help!!

  5. Deb says:

    I am trying to reference another spreadsheet with the name of customers in Column B and needing to reference their spending which is located in column D and divide column D by 4.
    Any help you can provide will be greatly appreciated.

  6. Deb says:

    I am trying to reference another spreadsheet with the name of customers in Column B and needing to reference their spending which is located in column D and divide column D by 4. There are 700+ customers so I want to ensure that I reference the correct customer with their spending instead of having to key all manually.
    Any help you can provide will be greatly appreciated.

  7. Jason Smith says:

    So I need to run a report where I need to count up how many times an item shows up across 12 different sheets (each sheet is a month of data). Is there a way to use vlookup to look in an entire workbook without having to input every worksheet name in the formula?

    • Hello, Jason,

      If you need to count up how many times an item shows up in your sheets, please try the combination of COUNTIF and SUMPRODUCT functions. First you need to create a range containing the names of the relevant sheets, and then use the following formula:


      Where &A2:A14& is the list with the sheets names; A2:A10 is the data range that you want to count the specified value across worksheets; C2 is the cell with the value you want to count up.

      Hope this will help.

  8. Angela says:

    How do I identify records from one worksheet A which is not in worksheet B and then copy only those record from A to B which is not in B.Please help.

  9. TC says:

    Your wildcard examples work on no data, but the exact values you used in your example. I tried to replicate your using the cell contents example with the animal table using =VLOOKUP("*"&C1&"*",$A$2:$B$13, 1,FALSE) where C1 has Coy typed into it. It should find "Coyote" and return the speed but it does not. I cannot figure out what is going wrong.

  10. LLB says:

    Hello! I have a VLookup that I am using with the IF function to pull pay rates (regular/overtime) and match it with employee names. My data is in 3 columns (Employee,Reg. Rate, OT Rate) and the lookup is checking 2 columns (Employee, Pay Type) for data. It's working great EXCEPT, I cannot get the N/A to hide if the columns are blank. Below is the current formula:

    =IF(B8="overtime", VLOOKUP(A8, EmployeeRates, 3, FALSE), VLOOKUP(A8, EmployeeRates, 2, FALSE))

    Any help would be greatly appreciated.

  11. VENKATA GIRISH says:

    I have to register daily sales details, for example 01-01-2018 Raju sales in rupees Rs.1000/-, Ramu sales in rupees Rs.1500/-, now I need 01-01-2018 individual sales amount in another sheet

  12. Eng Choon says:

    Big thanks to Microsoft for inventing vlookup function.
    As a Senior manager I rely on this, not my staff.
    They all leave me. They hate me.

  13. Dondov says:


    please help me.

  14. Adrian says:

    If the unique identifiers is repeated a few time in the table for example "Product1" appears three times and I would like the corresponding data or all three times it appears, may I know how it can be done. The three corresponding data is text and should appear on three different lines. Thanks for your help.

Post a comment

Unfortunately, due to the volume of comments received we cannot guarantee that we will be able to give you a timely response. When posting a question, please be very clear and concise. We thank you for understanding!
Excel add-ins and Outlook tools - Ablebits.com
Ultimate Suite for Excel Professionals
60+ professional tools for Excel 2016-2007 to do your daily work
Incredible product, even better tech support…AbleBits totally delivers!
Deborah Bryant
Anyone who works with Excel is sure to find their work made easier
Jackie Lee
The best spent money on software I've ever spent!
Patrick Raugh
Ablebits is a fantastic product - easy to use and so efficient.
Debra Celmer
Excel is at its best now
Annie C.
I don't know how to thank you enough for your Excel add-ins
Jennifer Morningstar
Anybody who experiences it, is bound to love it!
Kumar Nepa
AbleBits suite has really helped me when I was in a crunch!
Nelda Fink
I have enjoyed every bit of it and time am using it
Christian Onyekachi Nwosu
It's the best $100 we've ever spent!
Mike Cavanagh
I love the program, and I can't imagine using Excel without it!
Robert Madsen
One word… WOW!
Dave Brown
Love the products!
David Johnston
It is like having an expert at my shoulder helping me…
Linda Shakespeare
Your software really helps make my job easier
Jeannie C.
Thanks for a terrific product that is worth every single cent!
Dianne Young
I love your product
Brad Gibson
Sheila Blanchard