Two-Way Lookup with INDEX and MATCH

Excel Formulas › Lookup

All versions

When the answer sits at the intersection of a row and a column — a price grid, a rate table, a schedule — INDEX with two MATCH functions finds it in one formula.


Quick formula: MATCH the row label and the column label, then INDEX the intersection:
=INDEX(Data,MATCH(RowLabel,RowHeaders,0),MATCH(ColLabel,ColHeaders,0))

No helper columns, and it works in every version of Excel.

Functions used (tap for the full reference guide):

The example

A price grid by product (rows) and region (columns). We want the Widget price in the West.

ABC
1ProductEastWest
2Widget$10$12
3Gadget$15$14

The formula

The inner MATCHes return the row and column positions; INDEX returns the cell where they cross:

=INDEX(B2:C3,MATCH("Widget",A2:A3,0),MATCH("West",B1:C1,0)) // row 1, column 2 of the grid = $12

How it works

Breaking it down:

  1. MATCH("Widget",A2:A3,0) finds Widget in the row labels and returns 1 (first row).
  2. MATCH("West",B1:C1,0) finds West in the column headers and returns 2 (second column).
  3. INDEX(B2:C3,1,2) returns the value at row 1, column 2 of the data grid — $12.
  4. The 0 in each MATCH forces an exact match, which is what you want for labels.

Point the row and column labels at input cells so the lookup becomes a live, two-dropdown query.

Try it: interactive demo

Interactive

Pick a product and a region; the price at the intersection updates.

Variations

Two-way lookup with XLOOKUP

On 365, nest XLOOKUP for a readable version.

=XLOOKUP("West",B1:C1,XLOOKUP("Widget",A2:A3,B2:C3))

Approximate (banded) row match

Use 1 instead of 0 in MATCH for a sorted-band lookup, e.g. tax brackets.

=INDEX(Data,MATCH(Income,Brackets,1),Col)

Pitfalls & errors

A typo or extra space in the label gives #N/A. The labels must match the headers exactly with exact-match MATCH.

Keep the INDEX data range aligned with the header ranges — if they drift apart, the position numbers point to the wrong cell.

Practice workbook

📊
Download the free Two-Way Lookup with INDEX and MATCH practice workbook
Change the yellow product and region; the price updates from the grid.

Frequently asked questions

Why not just use VLOOKUP?
VLOOKUP looks up by row only; you would need a fixed column index. INDEX/MATCH matches both the row and the column, so either can change freely.
Does the data have to be sorted?
No — with 0 (exact match) in both MATCH functions the grid can be in any order.
Can I use dropdowns for the labels?
Yes. Put Data Validation lists on the label cells and the intersection lookup becomes fully interactive.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Function references: INDEXMATCH