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, Office 2019, 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

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.