Related Tutorial: Step by Step version of Excel VLOOKUP tutorial including screen shots
This tutorial includes step by step instructions of how to use Excel's VLOOKUP function.
The syntax for the VLOOKUP function is:
= VLOOKUP ( lookup_value , table_array , col_index_num , range_lookup )
table_array: This is the table of data that VLOOKUP searches to find the information you are after.
The table_array must contain at least two columns of data. The first column contains the lookup_values.
col_index_num: The number of the column in the table_array that contains the data you want returned.
range_lookup: A logical value (TRUE or FALSE only) that indicates whether you want VLOOKUP to find an exact or an approximate match to the lookup_value. Typing False will return exact matches only.
Example: How to Use Excel's VLOOKUP Function
Note: Before using VLOOKUP, make sure the table of data (the table_array) is sorted in ascending order (alphabetically A to Z).
- Enter the data below into cells D1 to E8 as seen in the second image above.
Remember to leave cells D2 and E2 blank. This is where the results of the VLOOKUP function will be displayed.
Part Name Price Part Price Bearing $17.34 Gear $23.56 Widget $14.76 Cog $20.21 Bolt $1.54 Washer $1.43
- Click on cell E2 - the location where the results will be displayed.
- Click on the Formulas tab.
- Choose Lookup & Reference from the ribbon to open the function drop down list.
- Click on VLOOKUP in the list to bring up the function's dialog box.
- In the dialog box, click on the Lookup _value line.
- Click on cell D1 in the spreadsheet to enter that cell reference into the dialog box. This is the cell where we will type the part name about which we are seeking information.
- In the dialog box, click on the Table_array line.
- Drag select cells D4 to E8 in the spreadsheet to enter that range into the dialog box. The table_array is the table of data that VLOOKUP searches for the lookup_value specified in cell D1.
- In the dialog box, click on the Col_index_num line.
- Type the number 2 to indicate that the data we want returned is in column 2 of the table_array.
- In the dialog box, click on the Range_lookup line.
- Type the word False to indicate that we want an exact match for our requested data.
- Click OK.
- In cell D1 of the spreadsheet, type the word bolt.
- The value $1.54 should appear in cell E1 displaying the price of a bolt as indicated in the table_array.
- If you click on cell E1, the complete function = VLOOKUP ( D1 , D4:E8 , 2 , FALSE ) appears in the formula bar above the worksheet.