INDEX MATCH in Excel: how it works, with multiple criteria
How INDEX MATCH works in Excel, step by step: look up to the left, match on two or more criteria, two-way lookups, and fixes for #N/A and wrong rows.
Find the value where a row and a column cross.
One MATCH finds the row, another the column, and INDEX picks the cell.
Find the sales for each region and month in A9:B13. Put the formulas in C9:C13.
Typing formulas is easiest on a computer with a keyboard.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Jan | Feb | Mar | Apr | May | Jun | ||
| 2 | North | 1580 | 200 | 1360 | 2360 | 2340 | 820 | |
| 3 | South | 1550 | 1790 | 1140 | 2390 | 1200 | 1280 | |
| 4 | East | 500 | 1090 | 740 | 540 | 1280 | 340 | |
| 5 | West | 1070 | 1890 | 830 | 620 | 290 | 1140 | |
| 6 | Central | 1500 | 1960 | 850 | 650 | 1650 | 1400 | |
| 7 | ||||||||
| 8 | Region | Month | Sales | |||||
| 9 | East | Mar | ||||||
| 10 | East | Feb | ||||||
| 11 | East | May | ||||||
| 12 | Central | Jun | ||||||
| 13 | North | Jan | ||||||
| 14 | ||||||||
| 15 | ||||||||
| 16 | ||||||||
| 17 |
Finding the value where a row and a column cross: the sales for South in March, or the price for a size and a colour. You look up two things at once, one down the side and one across the top.
INDEX do it?INDEX can take a row number and a column number: =INDEX($B$2:$G$6,3,2) gives the cell 3 rows down and 2 across. Find each number with MATCH:
=INDEX($B$2:$G$6,
MATCH finds the region's row in the labels down the side.The labels down the side must cover the same rows as the INDEX range, and the labels across the top the same columns. Here A2:A6 matches rows 2 to 6 and B1:G1 matches columns B to G.
XLOOKUP way?Yes, one XLOOKUP inside another. The inner one returns the region's whole row; the outer one picks the month from it:
=XLOOKUP(B9,
How INDEX MATCH works in Excel, step by step: look up to the left, match on two or more criteria, two-way lookups, and fixes for #N/A and wrong rows.
Know someone fighting with a spreadsheet? Send them this page.