Two-way lookup with INDEX and MATCH
To search for something across both rows and columns in Excel, or we say to lookup a value at the intersection of the specific row and column, we can use the help of INDEX and MATCH functions.
How to perform a two-way lookup with INDEX and MATCH?
To fill in the information about the sales made by Samantha during the month of July in the cell H7 as shown above, you can use the MATCH function twice to get the row (name) and column (month) numbers. The INDEX function will then retrieve the sales from the sales range based on the location numbers supplied by MATCH. (Note that the row number goes ahead of the column number in an INDEX formula.)
- return_range: The range where you want the combination formula to return the sales from. Here refers to the sales range.
- lookup_vertical/horizontal_value: The value MATCH used to locate its row or column number. Here refers to the given month and name.
- lookup_column/row_range: The range of cells where the lookup_vertical/horizontal_value is listed. Here refers to the month and name ranges.
- match_type 0: Forces MATCH to find the first value that exactly equals to the lookup_value.
To find the sales made by Samantha during the month of July, please copy or enter the formula below in the cell H7, and press Enter to get the result:
Or, use a cell reference to make the formula dynamic:
Explanation of the formula
- MATCH(H4,B5:B10,0): The MATCH function finds the position of Samantha, the exact value in the cell H4, in the range B5:B10. So it will return 3 since Samantha is at the 3rd position of the list.
- MATCH(H5,C4:E4,0): The MATCH function finds the position of July, the exact value in the cell H5, in the range C4:E4. So it will return 2 since July is at the 2nd position of the range.
- INDEX(C5:E10,MATCH(H4,B5:B10,0),MATCH(H5,C4:E4,0)) = INDEX(C5:E10,3,2): The INDEX function retrieves the value at the intersection of the 3rd row and 2nd column in the sales range C5:E10, which is the value in the cell D7, $30,051.
Excel INDEX function
The Excel INDEX function returns the displayed value based on a given position from a range or an array.
Excel MATCH function
The Excel MATCH function searches for a specific value in a range of cells, and returns the relative position of the value.
Two-way approximate match with multiple criteria
In this tutorial, we will talk about how to look for an approximate match based on multiple criteria listed both in columns and rows in an Excel spreadsheet, with the help of INDEX, MATCH, and IF functions.
Multiple-criteria lookup with INDEX and MATCH
When dealing with a big database in an Excel spreadsheet with several columns and row captions, it’s always tricky to find something that meets multiple criteria. In this case, you can use an array formula with the INDEX and MATCH functions.
Left lookup with INDEX and MATCH
To find out information listed in the left columns in an Excel spreadsheet about a given item which is at the right side, you can use the INDEX and MATCH functions. The combination of the two functions possesses an advantage of looking up values in any column over another Excel’s powerful lookup function, the VLOOKUP.
The Best Office Productivity Tools
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
Supports Office/Excel 2007-2021 and 365 | Available in 44 Languages | Easy to Uninstall Completely
Full-Featured 30-Day Free Trial | 60-Day Unconditional Money-Back GuaranteeRead MoreDownload
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Full-Featured 30-Day Free Trial | 60-Day Unconditional Money-Back GuaranteeRead More Download
Please leave your comments in English