INDEX MATCH in Excel is a pair of functions that work as one lookup: MATCH finds where a value sits in a list, and INDEX returns the value at that position from another column. It is the classic fix when VLOOKUP cannot look to the left, and it still matters if you share files with people on Excel 2019 or older. Every result below was worked out by hand from the small tables shown, including the setting that quietly returns the wrong row.

INDEX MATCH syntax
=INDEX(return_range, MATCH(lookup_value, lookup_range, 0))
MATCH(lookup_value, lookup_range, [match_type]) returns a position number, such as 4 for “the fourth cell in the range”. INDEX(array, row_num, [column_num]) returns the value at that position. Put MATCH inside INDEX, in the row_num slot, and the two steps happen in one cell. The inner function runs first.

A worked example
Type this table into A1:D7. The ID sits to the left of the name, which is the direction VLOOKUP cannot search. Two people are called Cara, on purpose.
| A: ID | B: Name | C: Dept | D: Salary | |
|---|---|---|---|---|
| 2 | 1001 | Anna | Sales | 4200 |
| 3 | 1002 | Ben | Ops | 3900 |
| 4 | 1003 | Cara | Support | 3800 |
| 5 | 1004 | Dan | Sales | 4500 |
| 6 | 1005 | Eli | Ops | 3600 |
| 7 | 1006 | Cara | Sales | 3100 |
To get Dan’s ID: =INDEX(A2:A7,MATCH("Dan",B2:B7,0)) returns 1004. MATCH finds Dan 4th in B2:B7, and INDEX takes the 4th value of A2:A7. To get his salary, change only the INDEX range: =INDEX(D2:D7,MATCH("Dan",B2:B7,0)) returns 4500. The MATCH part stays the same, so you can copy it for every column you want to pull. If the name is typed in F2, replace “Dan” with F2.
The third MATCH argument: 0, 1 or -1
The most common reason INDEX MATCH returns a wrong value is the last argument of MATCH. If you leave it out, Excel uses 1, which is an approximate match.
| Type | Finds | List must be |
|---|---|---|
0 | The first value exactly equal to the lookup value | In any order |
1 (default) | The largest value less than or equal to the lookup value | Sorted ascending |
-1 | The smallest value greater than or equal to the lookup value | Sorted descending |
Try it on the ID column, which is sorted. =MATCH(1010,A2:A7,0) returns #N/A, because there is no ID 1010. =MATCH(1010,A2:A7,1) returns 6, the position of 1006, the largest ID that is not above 1010. With the default, a missing ID does not fail. It silently returns the nearest row, and INDEX hands you a believable but wrong salary. For names, IDs and codes, always type the 0.
Type 1 is meant for bands. With cut-offs 0, 60, 70, 80, 90 in A2:A6 and grades F, D, C, B, A in B2:B6, =INDEX(B2:B6,MATCH(75,A2:A6,1)) returns C: the largest cut-off not above 75 is 70, the 3rd. In the same way 92 gives A, 80 gives B and 59 gives F. For type -1, a descending list 100, 75, 50, 25 in A2:A5 gives =MATCH(60,A2:A5,-1) = 2, the smallest value that is 60 or more (75).
Wildcards: with type 0 and a text lookup value, ? matches one character and * any run of characters, so =MATCH("Ca*",B2:B7,0) returns 3. Matching is not case-sensitive. If the value appears more than once, MATCH returns only the first position: =INDEX(A2:A7,MATCH("Cara",B2:B7,0)) gives 1003, never 1006 (Microsoft documents both behaviors).
Row and column at once: two MATCH functions
For a grid, use one MATCH for the row and a second for the column: =INDEX(table, MATCH(row_value, row_labels, 0), MATCH(column_value, column_labels, 0)). Say A1:D4 holds products down the side and months across the top:
| A | B: Jan | C: Feb | D: Mar | |
|---|---|---|---|---|
| 2 | Pen | 120 | 280 | 150 |
| 3 | Pad | 90 | 60 | 210 |
| 4 | Tape | 300 | 240 | 180 |
For Pad in March: =INDEX(B2:D4,MATCH("Pad",A2:A4,0),MATCH("Mar",B1:D1,0)). The first MATCH returns 2, the second returns 3, and INDEX takes row 2, column 3 of B2:D4, which is 210. Pen in Feb gives 280 and Tape in Jan gives 300. Leave the header cells out of the INDEX range, and keep the label ranges the same size as the rows and columns they describe.

Two conditions in one lookup
Which Cara earns 3100? Name alone cannot tell, so test two columns at once and find the row where both are true: =INDEX(D2:D7,MATCH(1,(C2:C7="Sales")*(B2:B7="Cara"),0)) returns 3100. Each comparison gives TRUE or FALSE, and multiplying turns them into 1 or 0. Only position 6 (row 7) is Sales and Cara, so it is the only 1. In Excel 365 and 2021, press Enter. In older versions this may need Ctrl+Shift+Enter. In Google Sheets, wrap the test in ARRAYFORMULA: MATCH(1,ARRAYFORMULA((C2:C7="Sales")*(B2:B7="Cara")),0).
Handle a missing value: IFERROR
When MATCH finds nothing it returns #N/A, and INDEX passes it on. =IFERROR(INDEX(A2:A7,MATCH("Zoe",B2:B7,0)),"Not found") shows Not found. Add IFERROR last, after the formula works, because it also hides real mistakes such as a wrong range. For #N/A only, IFNA is the narrower choice.
INDEX MATCH vs VLOOKUP vs XLOOKUP
On the first table, all three give the same answer for Dan’s salary: =XLOOKUP("Dan",B2:B7,D2:D7) and =INDEX(D2:D7,MATCH("Dan",B2:B7,0)) both return 4500, and =VLOOKUP("Dan",B2:D7,3,FALSE) returns 4500 too, but only because the salary is to the right of the name. The ID cannot be fetched that way. VLOOKUP also counts columns by number, so inserting a column inside the table shifts the result, while INDEX ranges adjust themselves. XLOOKUP is shorter and needs Microsoft 365 or Excel 2021 or later. Use INDEX MATCH when the file must open in older versions, when you maintain a workbook built with it, or when one MATCH can feed several INDEX columns.

Why INDEX MATCH returns #N/A or the wrong value
Hidden spaces. “Dan ” with a trailing space does not match “Dan”. Clean the column with TRIM.
Numbers stored as text. The number 1004 and the text “1004” look the same and never match. Convert both sides to the same type.
Ranges that start on different rows. If MATCH looks at B2:B7 and INDEX at A3:A8, every position is off by one row and you get a neighbour’s value with no error. Keep the first and last rows identical.
The default match type. Forgetting the 0 on an unsorted list can return a wrong row or #N/A. When copying a formula down or across, lock the ranges with dollar signs, as in $B$2:$B$7.

Google Sheets uses the same INDEX and MATCH syntax with the same 0, 1 and -1 types. Only the two-condition version needs ARRAYFORMULA, as shown above.
Frequently asked questions
How does INDEX MATCH work in Excel?
MATCH returns the position of the lookup value in a list, and INDEX returns the value at that position from another range. =INDEX(A2:A7,MATCH("Dan",B2:B7,0)) returns 1004.
Why use INDEX MATCH instead of VLOOKUP?
It can return a value from a column to the left of the lookup column, and it does not break when you insert a column, because it uses ranges instead of a column number.
What should the third argument of MATCH be?
Use 0 for an exact match. Leaving it out means 1, which finds the largest value that is less than or equal to the lookup value and needs a sorted list.
Can INDEX MATCH use two criteria?
Yes. Multiply the tests inside MATCH and look for 1: =INDEX(D2:D7,MATCH(1,(C2:C7="Sales")*(B2:B7="Cara"),0)). Older Excel versions may need Ctrl+Shift+Enter.
Is XLOOKUP better than INDEX MATCH?
XLOOKUP is shorter and easier to read, but it needs Microsoft 365 or Excel 2021 or later. INDEX MATCH works in every version.
Sources: Last checked November 2026. Microsoft Support: MATCH function; Exceljet: INDEX and MATCH; Google: MATCH in Google Sheets.