Create a Two Way Lookup using INDEX and MATCH
The VLOOKUP function will look down the leftmost column of a table and return a value from a specified column index number.
The INDEX and MATCH functions can be used to create a two way lookup to look for a value in a column, and also to look for the column containing the value to return.
These two functions used together create a very versatile and dynamic lookup formula. A far cry from the rigid structure of VLOOKUP.
In the example below we wish to look for an order using the ID, and return the salesperson's name and the order amount using the same lookup formula in both cells.
The INDEX and MATCH Functions
The two way lookup formula is a combination of the INDEX and MATCH functions. These two functions are fantastic and have many uses in Excel. Let's have a little look at the two of them first.
The INDEX function is used to return a value from a specified column and row. In addition to its use in a two way lookup, this function is used when working with form controls on a spreadsheet.
When used to return a value it is written as below.
=INDEX(array, row_num, [column_num])
This function wants to know the row and column number of the cell containing the value to return.
The MATCH function is the driving force in this formula. It will be used to find and return the row and column numbers for the INDEX function. INDEX can then return the value from that cell.
The MATCH function is heavily used in many lookup and reference situations to add extra muscle to the likes of VLOOKUP, or Conditional Formatting.
It's structure is as below.
=MATCH(lookup_value, lookup_array, [match_type])
The lookup value is the value to search for.
The lookup array is the range of cells to search in.
Match type is the type of lookup to use. You can select an exact match, or one that finds the closest match if it cannot find the value you are looking for.
Create the Two Way Lookup Formula
In this example the formula below is entered into cell J4 and copied into K4.
Watch the Video
- Case sensitive lookup
- Compare two lists using VLOOKUP
- Find the cell address of a value
- Create a lookup formula to return a picture from a list
Follow us on
Popular Excel Tips