Excel INDEX MATCH for Beginners: How It Works

Formulas & functions · Updated December 2, 2026

Excel’s INDEX and MATCH functions work together to look up a value in a table: MATCH finds the position of a requested item, and INDEX returns the value at that position. For example, you can use them to find a product’s price by its name, even when the return column is to the left of the lookup column.

What INDEX MATCH does

A lookup formula answers a practical question such as “What is the price of this product?” It searches for a known item, then returns information from the corresponding row or column. INDEX MATCH does this in two steps inside one formula.

  • MATCH searches a range and returns the relative position of a matching value. It returns a number, not the matched value itself.
  • INDEX returns a value from a range when given a row position and, when needed, a column position.

Suppose a worksheet has product names in A2:A5 and prices in B2:B5. The rows contain Notebook, Pen, Folder, and Ruler, with prices of 3.50, 1.25, 2.00, and 0.80 respectively. If D2 contains Folder, MATCH identifies Folder as the third item in A2:A5. INDEX then returns the third value from B2:B5, which is 2.00.

Build a basic INDEX MATCH formula

For the example above, enter this formula in E2:

With product names in A2:A5, prices in B2:B5, and the requested product in D2, use =INDEX(B2:B5,MATCH(D2,A2:A5,0)). If D2 contains Folder, the result is 2.00.

Read the formula from the inside out. MATCH checks D2 against A2:A5. Its third argument, 0, asks for an exact match, and the function returns 3 because Folder is the third entry in the lookup range. INDEX uses 3 as the position in B2:B5 and returns that range’s third value.

  1. Select the cell where you want the answer.
  2. Type =INDEX( and select the range containing the answer, such as B2:B5.
  3. Type a comma, then MATCH(. Select the lookup value, type a comma, and select the range Excel should search.
  4. Add ,0) to MATCH for an exact match, close INDEX with ), and press Enter.

In Excel for Microsoft 365 on Windows, commas are the usual formula argument separators. Some regional settings use semicolons instead; if Excel rejects a formula with commas, check the list separator configured for your system.

How INDEX and MATCH work

The syntax of MATCH is MATCH(lookup_value,lookup_array,match_type). The lookup value is what you want to find, and the lookup array is the one-dimensional range to search. For beginner lookup formulas, use 0 as match_type to request an exact match. The other match types rely on sorted data and are easier to misuse if the sort order is not correct.

INDEX has a basic array form: INDEX(array,row_num,[column_num]). The array is the range from which Excel should return a value. In a single-column range, the row number is enough. In a two-dimensional range, the row and column numbers identify the intersection. The square brackets around column_num in the syntax indicate an optional argument; do not type those brackets into the formula.

The ranges must line up. If the lookup range starts at A2 and ends at A5, the return range should represent the corresponding four rows, such as B2:B5. If one range starts on a different row or contains a different number of entries, MATCH’s position may point to the wrong item in the return range.

Look up values in either direction

One useful feature of INDEX MATCH is that the lookup range and return range can be in either order on the worksheet. VLOOKUP traditionally requires its lookup column to be the leftmost column of its table. INDEX MATCH does not have that restriction.

For example, if product names are in B2:B5 and product codes are in A2:A5, you can search the names and return codes from the column to their left. With names in B2:B5, codes in A2:A5, and the requested name in D2, use =INDEX(A2:A5,MATCH(D2,B2:B5,0)). If D2 contains Folder and the corresponding code in A4 is F104, the formula returns F104.

For a two-way lookup, MATCH can find both a row and a column, while INDEX returns their intersection. Assume a table of monthly sales occupies B2:D5, with product names in A2:A5 and month headings in B1:D1. With the requested product in F2 and month in F3, use =INDEX(B2:D5,MATCH(F2,A2:A5,0),MATCH(F3,B1:D1,0)). If the requested row and column intersect at 120, the result is 120. The row MATCH searches the product labels; the column MATCH searches the month headings.

Common errors and how to fix them

The most frequent problem is #N/A, which means MATCH did not find an exact match. Check spelling, extra spaces, and whether one value is stored as text while the other is stored as a number. A code such as 0012 may not behave like the number 12, because leading zeros can be meaningful in text identifiers. Make sure the lookup value is present in the selected range.

A wrong result can come from mismatched ranges, an incorrect match type, or duplicate lookup values. With exact matching, MATCH returns the position of the first matching entry it encounters. If duplicates exist, INDEX MATCH will therefore return the corresponding value from the first occurrence; it does not automatically return every match.

If you copy a formula and the ranges shift, make them absolute with dollar signs. With names in A2:A20, sales in B2:B20, and the lookup value in D2, use =INDEX($B$2:$B$20,MATCH(D2,$A$2:$A$20,0)). The dollar signs keep the ranges fixed when the formula is copied, while D2 can change to D3, D4, and so on.

INDEX MATCH compared with XLOOKUP and VLOOKUP

For a straightforward lookup in Microsoft 365, XLOOKUP can be more direct because it combines the search and return ranges in one function. INDEX MATCH remains valuable because it is widely understood, supports flexible row-and-column lookups, and works in older Excel versions that do not include XLOOKUP. XLOOKUP is available in Microsoft 365 and Excel 2021 or later.

VLOOKUP is also a familiar option, but its lookup column must be the first column of the selected table and its return column is specified by a column number. INDEX MATCH can search one range and return from another range, including one to the left. For a beginner, the best choice depends on the Excel version, the layout, and whether a simple formula or broader compatibility matters. None of these functions automatically fixes inconsistent data or duplicate keys.

Frequently Asked Questions

Is INDEX MATCH hard to learn?
It may look unfamiliar at first, but the logic is simple: MATCH finds a position and INDEX returns the value at that position. Starting with a one-column exact-match example makes the parts easier to see.

Why does MATCH use 0?
In the third argument of MATCH, 0 requests an exact match. This is usually the safest choice for looking up a name, code, or other specific label. Other match types have sorted-data requirements.

Can INDEX MATCH return a value to the left?
Yes. Put the return range in INDEX and the lookup range in MATCH, regardless of which one is farther left on the sheet. Ensure both ranges refer to corresponding rows.

Does INDEX MATCH return all duplicate matches?
No. A standard MATCH returns the position of the first matching value. To return multiple matching rows, use a different approach, such as FILTER in Excel for Microsoft 365 or Excel 2021 and later.

Does INDEX MATCH work in older Excel versions?
INDEX and MATCH are available in many older desktop versions of Excel, which is one reason the combination remains common. Function behavior and interface details can vary by version, but the basic exact-match formula is broadly supported.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.