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 it creates.
-
On the Tools menu, click Add-ins, select the Lookup Wizard box, and then click OK.
- Click a cell in the range.
- On the Tools menu, click Lookup.
- Follow the instructions in the wizard.
Look up values by comparing them with the values in the first column
Use the VLOOKUP function to do this task.
Important This method only works if the values in the first row or column have been sorted in ascending order.
Worksheet example
The example may be easier to understand if you copy it to a blank worksheet.
- Create a blank workbook or worksheet.
- Select the example in the Help topic. Do not select the row or column headers.
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 Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
In this example, you know the frequency and want to look up the associated color.
|
|
Function details
Look up values by comparing them with the values in the first row
Use the HLOOKUP function to do this task
Important This method only works if the values in the first row or column have been sorted in ascending order.
Worksheet example
The example may be easier to understand if you copy it to a blank worksheet.
- Create a blank workbook or worksheet.
- Select the example in the Help topic. Do not select the row or column headers.
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 Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
|
Function details
Look up values in a range that isn't sorted
Use the INDEX and MATCH functions to do this task.
Worksheet example
The example may be easier to understand if you copy it to a blank worksheet.
- Create a blank workbook or worksheet.
- Select the example in the Help topic. Do not select the row or column headers.
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 Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
|
The formula uses the following arguments.
Formula to look up a value in an unsorted range (INDEX function)
A2:B5: The entire range in which you are looking up values
MATCH("Pears",A2:A5,0): The MATCH function determines the row number
"Pears": The value to find in the lookup column.
A2:A5: The column for the MATCH function to search.
2: The column from which to return the value. The leftmost column is 1.
Function details
Look up values in a range of uncertain size that isn't sorted
Use the OFFSET and MATCH functions to do this task.
Use this process 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 first column isn't sorted alphabetically.
Worksheet example
The example may be easier to understand if you copy it to a blank worksheet.
- Create a blank workbook or worksheet.
- Select the example in the Help topic. Do not select the row or column headers.
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 Tools menu, point to Formula Auditing, and then click Formula Auditing Mode.
|
|
The formula uses the following arguments.
A1: The upper left cell of the range, also called the starting cell.
MATCH("Pears",A2:A5, 0): The MATCH function determines the row number below the starting cell to find the look up value.
"Pears": The value to find in the lookup column.
A2:A5: The column for the MATCH function to search. Don't include the starting cell in this range.
1: The number of columns to the right of the starting cell to find the lookup value.