Use INDEX and MATCH in Excel
The INDEX and MATCH functions can be used to lookup and retrieve data from any column of an Excel table. These functions are seen as an alternative to VLOOKUP function, which is limited by always looking in the first column of a table.
Using the INDEX and MATCH functions is more flexible and more dynamic than VLOOKUP. For example, inserting columns into an Excel Table would result in the VLOOKUP functions returning the wrong data.
However, the INDEX and MATCH functions would not be harmed by this, and would function as normal.
Let’s have a look at each function independently first, and then we shall see the magic when they are put together.
The INDEX function returns an item from a specific position in a list.
The syntax for the INDEX function is;
=INDEX(array, row_num, [col_num])
Array: The list that you want to search within
Row_num: The row number containing the data you want to return
Col_num: The column number containing the data you want to return. Col_num is optional
For example, the INDEX function below returns the value in the 6th row and 3rd column.
More Lookup Articles
- Lookup Data Based on Multiple Conditions in Excel
Being able to look up and return values from a table is an important skill in Excel. This article looks at looking up data in a tables that meets multiple criteria.
- How to Use Vlookup across Multiple Sheets
The Vlookup function in Excel is traditionally used to look for and return a value in a table on one worksheet. However Vlookup can be used to look up and return a value across multiple sheets in Excel.
- Use Sheet Names with Vlookup
The Vlookup function in Excel is used to search for and return values from another worksheet. It is possible to refer to the worksheet name when using this formula. This make it easier when writing and updating the formulas.
The MATCH function returns the position of a value in a list.
=MATCH(lookup_value, lookup_array, [match_type])
Lookup_value: The value you are looking for in the list
Lookup_array: The list that you are searching
Match_type: How to match the lookup value. It can be -1, 0 or 1.
- 1 – Finds the largest value less than or equal to the lookup value. The list should be sorted in ascending order for this match type
- 0 – Finds the first value that is equal to the lookup value. The list can be in any order for this match type
- -1 – Finds the smallest value greater than or equal to the lookup value. The list should be sorted in descending order for this match type
For example, the MATCH function below returns the position of Tye Training in the list.
Using INDEX and MATCH to Lookup Data
Let’s look at using INDEX and MATCH together to return the name of the company for a specific outstanding amount. The example below actually returns the name of the company with the highest outstanding amount, as the MAX function has been used in cell G3.
Notice that the function searches for a value in the 3rd column and returns a value from the 1st column. This is something that the VLOOKUP function cannot perform, due to its limitation of always looking in the first column.
More by this Author
If you are using pictures in your Excel spreadsheet you may be having some difficulty with sorting the pictures along with the other data in the list. The good news is that you can sort pictures in an Excel list just...
This article will look at how to create an FA cup draw in Excel. The Excel FA cup draw file is available for download and the functions and techniques that are used are explained. The finished spreadsheet provides...
Brock Lesnar is a phenomenon of a man and an athlete. Brock Lesnar weighs a lean 265 lbs and yet possesses extreme speed, agility and athleticism. How a man carrying so much muscle mass can maintain such high levels of...
No comments yet.