Look up values in a list of data
Let's say that you want to look up an employee's phone extension by using their badge number, or the correct rate of a commission for a sales amount. You look up data to quickly and efficiently find specific data in a list and to automatically verify that you are using correct data. After you look up the data, you can perform calculations or display results with the values returned. There are several ways to look up values in a list of data and to display the results.
What do you want to do?
Look up values vertically in a list by using an exact match
To do this task, you can use the VLOOKUP function, or a combination of the INDEX and MATCH functions.
Example that uses the VLOOKUP Function
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example? Important For the example to work properly, you must paste it into cell A1 of the worksheet.

Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at a time.
Selecting an example from Help

Press CTRL+C.

Create a blank workbook or worksheet.

In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and pasting for each cell in the example.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
Important Do not select the row or column headers.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.


For more information about how to use this function, see VLOOKUP function.
Example that uses the INDEX and MATCH function
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?

Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at a time.Important Do not select the row or column headers.
Selecting an example from Help

Press CTRL+C.

Create a blank workbook or worksheet.

In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and pasting for each cell in the example.

Important For the example to work properly, you must paste it into cell A1 of the worksheet.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.


The formula uses the following arguments.
Formula to look up a value in an unsorted range (INDEX function)
1. A2:B5: The entire range in which you are looking up values.
2. MATCH("Pears",A2:A5,0): The MATCH function determines the row number.
3. "Pears": The value to find in the lookup column.
4. A2:A5: The column for the MATCH function to search.
5. 2: The column from which to return the value. The leftmost column is 1.
For more information about how to use these functions, see INDEX function and MATCH function.
Look up values vertically in a list by using an approximate match
To do this task, use the VLOOKUP function.
Important This method only works if the values in the first column have been sorted in ascending order.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?

Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at a time. Do not select the row or column headers.
Selecting an example from Help

Press CTRL+C.

Create a blank workbook or worksheet.

In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and pasting for each cell in the example.

Important For the example to work properly, you must paste it into cell A1 of the worksheet.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.
In this example, you know the frequency and want to look up the associated color.


For more information about how to use this function, see VLOOKUP function.
Look up values vertically in a list of unknown size by using an exact match
To do this task, use the OFFSET and MATCH functions.
Use this approach when your data is in an external data range that you refresh each day. You know the price is in column B, but you don't know how many rows of data the server will return, and the first column isn't sorted alphabetically.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?

Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at a time.
Important Do not select the row or column headers.
Selecting an example from Help

Press CTRL+C.

Create a blank workbook or worksheet.

In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and pasting for each cell in the example.

Important For the example to work properly, you must paste it into cell A1 of the worksheet.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.


The formula uses the following arguments.
1. A1: The upper left cell of the range, also called the starting cell.
2. MATCH("Pears",A2:A5, 0): The MATCH function determines the row number below the starting cell to find the look up value.
3. "Pears": The value to find in the lookup column.
4. A2:A5: The column for the MATCH function to search. Don't include the starting cell in this range.
5. 1: The number of columns to the right of the starting cell to find the lookup value.
For more information about how to use these functions, see MATCH function and OFFSET function.
Look up values horizontally in a list by using an exact match
To do this task, use the HLOOKUP function.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?

Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at a time.Important Do not select the row or column headers.
Selecting an example from Help

Press CTRL+C.

Create a blank workbook or worksheet.

In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and pasting for each cell in the example.

Important For the example to work properly, you must paste it into cell A1 of the worksheet.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.


For more information about how to use this function, see HLOOKUP function.
Look up values horizontally in a list by using an approximate match
To do this task, use the HLOOKUP function.
Important This method only works if the values in the first row have been sorted in ascending order.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example

Create a blank workbook or worksheet.

Select the example in the Help topic.
Note Do not select the row or column headers.
How do I copy an example?

Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at a time.
Important Do not select the row or column headers.
Selecting an example from Help

Press CTRL+C.

Create a blank workbook or worksheet.

In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and pasting for each cell in the example.

Important For the example to work properly, you must paste it into cell A1 of the worksheet.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

After you copy the example to a blank worksheet, you can adapt it to suit your needs.
Selecting an example from Help

Press CTRL+C.

In the worksheet, select cell A1, and press CTRL+V.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.


Notes

You can display the rate and return number as a percentage. Select the cell, and then on the Home tab, in the Number group, click Percent Style .

You can display the Sales Volume number as dollars. Select the cell, and then on the Home tab, in the Number group, click Accounting Number Format .
For more information about how to use this function, see HLOOKUP function.
Create a lookup formula with the Lookup Wizard
The Lookup Wizard creates the lookup formula based on a worksheet data that has row and column labels. The Lookup Wizard helps you find other values in a row when you know the value in one column, and vice versa. The Lookup Wizard uses INDEX and MATCH in the formulas that it creates.

Click a cell in the range.

On the Formulas tab, in the Solutions group, click Lookup.

If the Lookup command is not available, then you need to load the Lookup Wizard addin program.
How to load the Lookup Wizard Addin program

Click the Microsoft Office Button , click Excel Options, and then click the Addins category.

In the Manage box, click Excel Addins, and then click Go.

In the AddIns available dialog box, select the check box next to Lookup Wizard, and then click OK.

Follow the instructions in the wizard.