Skip to main content

Lookup formula page

INDEX MATCH Formula

Use INDEX MATCH when you need an exact lookup that does not require the return column to sit to the right.

Best for

Create an INDEX MATCH formula for exact lookup.

What it returns

If F2 is B-200, the formula returns 18.

Copy formulas

Excel formula
=INDEX(D2:D100, MATCH(F2, A2:A100, 0))
Google Sheets formula
=INDEX(D2:D100, MATCH(F2, A2:A100, 0))
Excel / Google Sheets difference

INDEX MATCH uses a separate return range and lookup range in both Excel and Google Sheets, with MATCH set to exact mode for these keys.

Example data

SKUItemCategoryPriceStock
A-100KeyboardHardware4918
A-101MouseHardware2532
B-200Desk MatOffice189
B-201NotebookOffice764
What it returns

If F2 is B-200, the formula returns 18.

How the formula works

  • MATCH finds the row position of F2 in A2:A100.
  • INDEX returns the value from D2:D100 at that position.
  • The 0 in MATCH forces exact match.
Syntax pieceRole in the formula
D2:D100The return range containing the value to bring back.
F2The lookup value to find.
A2:A100The lookup range containing the key values.
0The MATCH mode that requires an exact key match.

Verified examples

Desk mat price
=INDEX(D2:D100, MATCH(F2, A2:A100, 0))

Excel: Enter B-200 in F2 and use the sample product table with SKU in A and Price in D. Returns: 18

Mouse price
=INDEX(D2:D100, MATCH(F2, A2:A100, 0))

Google Sheets: Enter A-101 in F2 and use the same sample table. Returns: 25

Missing key fallback
=IFERROR(INDEX(D2:D100,MATCH(F2,A2:A100,0)),"Not found")

Excel: Enter C-999 in F2; that key is not in the sample table. Returns: Not found

Common errors and fixes

IssueLikely causeFix
INDEX MATCH returns an error despite a visible keyThe lookup and return ranges do not cover the same number of rows.Make D2:D100 and A2:A100 start and end on matching rows.
A matching key is not foundOne key has hidden spaces or one side is text while the other is a number.Normalize spaces and align the two cells' data types before matching.
The wrong row is returnedThe lookup range contains duplicate keys.Remove duplicates or accept that MATCH returns the first matching key.

When not to use this formula

  • Do not use INDEX MATCH when every matching row is needed; use FILTER instead.

Alternatives

AlternativeWhen to use it
XLOOKUP Exact Match FormulaUse when XLOOKUP is available and separate lookup and return ranges are preferred.
INDEX MATCH Formula BuilderUse when the lookup and return ranges need to be configured interactively.

Related formulas

Official references

FAQ

Why is MATCH set to 0?

0 requires an exact match, which is appropriate for SKUs, IDs, and other keys.

Can the INDEX return range be independent from the lookup range?

Yes. INDEX can return from D2:D100 while MATCH searches A2:A100, as long as the row positions align.