Lookups

How to Use VLOOKUP Step by Step

A step-by-step VLOOKUP tutorial for Excel: the four arguments, a worked price-list example, and how to fill the formula down without breaking it.

On this page
  1. The four arguments
  2. Build the formula one argument at a time
  3. Fill the formula down
  4. Use a table so the range grows
  5. Check the result

VLOOKUP searches the first column of a range for a value, then returns a value from another column in the same row. Once you know the four arguments, it is quick to write. Here is how to build one from start to finish.

The four arguments

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
  • lookup_value is the value you want to find, usually a cell reference such as E2.
  • table_array is the range that holds the data. Its first column must contain the values you are matching.
  • col_index_num is the column to return, counted from 1 at the left edge of the range you chose. It is not the column letter on the sheet.
  • range_lookup is the last argument. Type FALSE for an exact match. It is optional, but for most lookups you should type it. The difference is covered in vlookup exact match vs approximate match.

Build the formula one argument at a time

Suppose product codes are in column A, product names in column B and prices in column C, with the list running from row 2 to row 50. You type a product code in E2, and you want its price in F2.

  1. In F2, type =VLOOKUP(.
  2. Click E2 for the lookup value, then type a comma.
  3. Drag across the range A2:C50 to select it. Press F4 once so the references become absolute, showing as $A$2:$C$50. Type a comma.
  4. Type 3, because price is the third column counting from A. Type a comma.
  5. Type FALSE, then press Enter.

The finished formula reads:

=VLOOKUP(E2, $A$2:$C$50, 3, FALSE)

As you type, Excel shows a tooltip listing the arguments and highlights the one you are on, which makes it easy to check each part.

Fill the formula down

Once F2 works, drag its fill handle down the column. Because the table range is absolute, every row searches the same list. Only the lookup value changes, because E2 is a relative reference and moves down with each row.

Use a table so the range grows

If the price list is an Excel table, you can use the table’s name instead of a fixed range. Select the list and press Ctrl+T to turn it into a table, then give it a name on the Table Design tab, such as Products. A formula like this one then covers any rows added to the table later, without changing the formula:

=VLOOKUP(E2, Products, 3, FALSE)

Check the result

Test the formula with a code you already know the price for. If the answer is right for that code, copy the formula down and check a few more rows.

If you see #N/A, the code is not in the first column of the range. Check its spelling and any extra spaces. If you get a price from the wrong row, check the column number and make sure the last argument is FALSE. For more on wrong results, see why does vlookup return the wrong value.

Once this works on one sheet, the same steps apply when the list lives on another tab. vlookup from another sheet in excel shows how to point the formula at it.

The complete guide to lookups

How to Look Up Data in Excel
Read the guide

Keep exploring

Guides from other topics

All topics →