Skip to main content

How to use VLOOKUP in Microsoft Excel

Excel VLOOKUP function
Excel VLOOKUP function (Image credit: Windows Central)

In Microsoft Excel, VLOOKUP (vertical lookup) is a search function that you can use to find any data inside a particular column of the table by looking at the first column's entries and returning a corresponding value from another column.

While in a small table, you may be able to glance and quickly determine the information you need, it's different when working with an extensive spreadsheet with hundreds of rows and columns. Since you can spend a long time analyzing and finding the required information, Excel's VLOOKUP function was created to simplify data retrieval.

VLOOKUP works by performing a vertical search (top to bottom) for a value in the first column (that acts as the unique identifier), and then it returns a result from the matching row. The Excel function works like a drink menu at the coffee shop, where you start with the information you know, such as the drink's name, and then you look to the right to get the information you don't know, for example, the price.

In this Windows 10 guide, we'll walk you through the steps to correctly write a basic VLOOKUP function with the desktop version of Microsoft Excel, whether you use the version of Office available through a Microsoft 365 subscription (opens in new tab), Office 2019 (opens in new tab), Office 2016, or earlier version.

How to write VLOOKUP function in Excel

To write a VLOOKUP function manually in Excel, use these steps:

  1. Open Excel.
  2. Create the first column with items that will work as unique identifiers (required).

Source: Windows Central (Image credit: Source: Windows Central)
  1. Create one or more additional columns (on the right side) with the different values for each item from the first column (on the left side).

Source: Windows Central (Image credit: Source: Windows Central)
  1. Select an empty cell in the spreadsheet and specify the name of the item you want to find an answer to—for example, Orange.

Source: Windows Central (Image credit: Source: Windows Central)
  1. Select an empty cell to store the formula and returned value.
  2. In the empty cell, type the following syntax to create a VLOOKUP formula and press Enter:=VLOOKUP()

Source: Windows Central (Image credit: Source: Windows Central)
  1. Type the following arguments inside the parenthesis "()" to write the function and press Enter:=VLOOKUP(lookup_value,table_array,col_index_num,range_lookkup)
    • lookup_value: defines the cell that includes the product identifier from the first column on the left.
    • table_array: defines the range of data where you want to perform a search. Typically, you would select the entire Excel table.
    • col_index_num: defines the column number that the function will look to find a value. When specifying multiple columns, you should do from left to right.
    • Quick note: If you don't specify a value, then the "true" option will be applied by default. Sometimes, when using the "true" option, the first column needs to be shorted, which may cause an unexpected result. If you're not getting the correct value, you should use the "false" option or sort the first column alphabetically or numerically.
    In the command, make sure to update the variables inside the parenthesis with the information you want to query. Also, remember to use a comma to separate each value in the function. You do not need a space between each comma.Here's an example that returns the price for the 20oz bottle of orange juice:=VLOOKUP(C10,B4:E8,4,FALSE)

VLOOKUP lookup value sample (Image credit: Windows Central)

VLOOKUP table array sample (Image credit: Windows Central)

VLOOKUP column index number sample (Image credit: Windows Central)

Source: Windows Central (Image credit: Source: Windows Central)

Source: Windows Central (Image credit: Source: Windows Central)

Once you complete the steps, the feature will return the value for the item you specified on step No. 4. If you receive the "#NAME?" error value, then it means that the formula is missing one or multiple quotes.

If you are trying to find data for another item, update the name of the cell on step No. 4. For example, if you want to see the price for the "20oz" bottle of Kiwi juice, then replace "Orange" with "Kiwi" in the "lookup_value" cell and press Enter to update the result.

How to build VLOOKUP function in Excel

In addition to writing a formula directly into the spreadsheet, you can also use the Functions Arguments wizard, which gives you a more user-friendly interface to build the lookup formula.

To use the Function Arguments wizard to build a VLOOKUP formula in Microsoft Excel, use these steps:

  1. Open Excel.
  2. Create the first column with a list of items that will act as unique identifiers (required).

Source: Windows Central (Image credit: Source: Windows Central)
  1. Create one or more additional columns (on the right side) with the different values for each item from the first column (on the left side).

Source: Windows Central (Image credit: Source: Windows Central)
  1. Select an empty cell in the spreadsheet and specify the name of the item you want to find an answer to—for example, Orange.

Source: Windows Central (Image credit: Source: Windows Central)
  1. Select an empty cell to store the formula and the returned value.
  2. Click the Formulas tab.
  3. Under the "Functions Library" section, click the Lookup and Reference drop-down menu and select the VLOOKUP option to open the Functions Arguments wizard.

Source: Windows Central (Image credit: Source: Windows Central)
  1. In the Lookup_value field, specify the cell that contains the reference of the item you want to find the answer to—for example, C9.

Source: Windows Central (Image credit: Source: Windows Central)
  1. In the Table_array field, select the section of the table where the search will be performed. Usually, you want to select the entire table.

Source: Windows Central (Image credit: Source: Windows Central)
  1. In the Col_index_num field, specify the column number that contains the answer. For example, 4, which is the number of the column that stores the information you want to retrieve. In this case, the price for the 20oz bottle of juice.

Source: Windows Central (Image credit: Source: Windows Central)
  1. In the Range_lookup field, specify whether VLOOKUP should look for a specific match (false) or an approximate match (true).Quick note: Typically, you want to use the false option to query a specific match of the information you need.

Source: Windows Central (Image credit: Source: Windows Central)
  1. Click the OK button.

After you complete the steps, VLOOKUP will return the result based on the parameters you have defined in the Function Arguments wizard.

In the case that you want to determine the information for another item with different details from the first column, you want to repeat steps No. 4 through 12.

We're focusing this guide on the desktop version of Microsoft Excel for Windows 10, but you can also use VLOOKUP on the web version of Excel. However, the function wizard is available, which means you'll need to write the formula manually with the above steps. Also, these instructions should work with the version of Office available for macOS users.

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

8 Comments
  • Great guide. I use this all the time now and people are often asking me to show them how. Another good one is the combination of MATCH and INDEX, which gives you more power finding specific data in your table without needing to know what's in the first column.
  • Great guide but hasn't VLookup and HLookup been made obsolete by XLookup which was just released?
  • You're right! And XMATCH is the new version of MATCH. Thank you for drawing our attention to it. I think vlookup still has its uses if you are importing data from another source and you know that your leftmost (index) variable is x columns away from your target variable. That way if you knew the structure of your original data table you wouldn't have to hunt for the target column in the spreadsheet. Otherwise these new functions look a lot easier to work with. This'll make things a lot easier. Thanks again!
  • Vlookup, has a limitation that the first column must be the used as reference and you can't grab any data to the left of that column. In that case xlookup would work. Can you do a xlookup one too! Like the step through.
  • I just visited here to re-iterate the above comments on making a quick step by step on XLookUp. Thanks for this post!
  • They always say use INDEX MATCH instead of VLOOKUP.
  • +1 for Index Match!
  • Using XLOOKUP and XMATCH etc might not be a good idea because older versions of Excel might not support it.