Sunday, January 23, 2011

How to Setup the VLOOKUP Function in Excel


Determine the Value You Want to Look Up, Where to Put the Result and the Data Table
1. Put the value of the item you want to look up in a cell. For example, enter 'Product 1' in cell A1. This is the value you will look up and match to a value in the first column of your table array.
2. Determine where you want to place the result of the VLOOKUP. For example, you can look up the value 'Product 1' in cell A1 and place the result of the VLOOKUP (the color of the product) in cell A2. In this manner, you will have the name of the product next to the color of the product.
3. Select the location for your data set. For example: set the data set will be stored in D1:E5.
Create a Statement to Retrieve the Desired Value
4. Set the 'lookup_value' from the VLOOKUP statement. For example: the lookup_value of 'Product 1' is cell A1.
5. Set the 'table_array' from the VLOOKUP statement. For example: the table_array is the location of the data set where you will find the color of your products in cells D1:E5. Column D (the first column) will state all of the different products (Product 1, Product 2, Product 3, Product 4, Product 5) and Column E (the second column) will state all of the different colors of each product (Blue, Green, White, Red, Yellow).
6. Set the 'col_index_num' from the VLOOKUP statement. For example: the col_index_num is the number of the column in your table_array that contains the value you want to look up. Your product number is in column 1 and your color is in column 2. The column you want to retrieve from is column 2; therefore, your col_index_num is 2.
7. Set the '[range_lookup]' from the VLOOKUP statement. This is where you determine if you want an exact match or the closest match to the value you state. For example, if you want an exact match from Product 1 in column 1 to return the exact result of blue from column 2, you would set the [range_lookup] as FALSE, otherwise state it as TRUE.
8. Complete the VLOOKUP statement to retrieve the desired value in the cell you want to place the result.Example: in cell A2, input =VLOOKUP(A1, D1:E5,2,FALSE) to complete your VLOOKUP. A1 will contain 'Product 1' and A2 will 'Blue' as the result.

Blogger news