0Pricing
Excel Formulas Academy · Lesson

Multi-Criteria Lookups With INDEX-MATCH

Match on several columns at once to pinpoint a row.

Multi-Criteria Lookups With INDEX-MATCH is a free Excel Formulas Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Excel Formulas Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

When One Key Is Not Enough

Sometimes a single column does not uniquely identify a row. You might need the price for a product in a specific size, or the salary for an employee in a particular department.

That calls for a multi-criteria lookup: matching on two or more columns at once to pinpoint exactly one row.

INDEX-MATCH handles this elegantly by combining the conditions into a single match test, no extra helper columns required.

The Helper-Column Approach

The simplest mental model joins your key columns into one. Add a helper column that glues product and size together, then do an ordinary lookup against it.

For example a helper cell might hold =A2&"|"&B2, producing "Shirt|Large". You then MATCH "Shirt|Large" against that combined column.

This works, but it clutters your sheet. The next scenes show how to skip the helper entirely.

=A2 & "|" & B2

Matching Two Conditions At Once

The core trick: multiply the two condition tests together inside MATCH.

(A2:A10=G1) gives an array of TRUE/FALSE for the first criterion. (B2:B10=G2) does the same for the second. Multiplying them, (A2:A10=G1)*(B2:B10=G2), yields 1 only where both are TRUE and 0 elsewhere.

MATCH then looks for the value 1 to find the row meeting both conditions.

=(A2:A10=G1) * (B2:B10=G2)

Why Multiplying Means AND

In spreadsheets TRUE behaves as 1 and FALSE as 0. Multiplying two of these mimics a logical AND:

  • 1 times 1 = 1 (both conditions met)
  • 1 times 0 = 0
  • 0 times 1 = 0
  • 0 times 0 = 0

So only rows where both criteria hold produce a 1. Every other row becomes 0. That single 1 marks the row we want.

Finding the Row With MATCH

Now wrap the multiplied array in MATCH, searching for the exact value 1.

MATCH(1, (A2:A10=G1)*(B2:B10=G2), 0) returns the position of the first row where both conditions are TRUE.

If the matching combination sits in the fourth data row, MATCH returns 4. That position is what INDEX needs to fetch the answer.

=MATCH(1, (A2:A10=G1)*(B2:B10=G2), 0)

Returning the Value With INDEX

Feed that MATCH result into INDEX over the column you actually want, say the price in C2:C10.

The complete formula reads: from C2:C10, return the value at the row where product equals G1 and size equals G2.

This is a true multi-criteria lookup with no helper column and no rearranging of your data.

=INDEX(C2:C10, MATCH(1, (A2:A10=G1)*(B2:B10=G2), 0))

Entering It Correctly

This formula evaluates arrays of conditions. In modern Excel and Google Sheets you simply press Enter and it works.

In older Excel (before dynamic arrays) you must confirm it as an array formula with Ctrl+Shift+Enter, which adds curly braces. If your result is wrong or shows an error in legacy Excel, that confirmation step is usually the missing piece.

=INDEX(C2:C10, MATCH(1, (A2:A10=G1)*(B2:B10=G2), 0))

Adding a Third Condition

Need three criteria? Just multiply in another test. Suppose you also want to match a color in column D against input G3.

Each extra (range=criterion) factor narrows the result further. Only rows where all conditions are TRUE keep a product of 1; any FALSE turns the whole product to 0.

The pattern scales to as many columns as you need.

=INDEX(C2:C10, MATCH(1, (A2:A10=G1)*(B2:B10=G2)*(D2:D10=G3), 0))

A Worked Example

Data: A = product, B = size, C = price. You want the price of a "Shirt" in "Large".

  • G1 = "Shirt", G2 = "Large".
  • The condition arrays produce a 1 only on the Shirt+Large row, say row 4.
  • MATCH(1, ..., 0) returns 4.
  • INDEX(C2:C10, 4) returns that row's price.

Change either input and the formula re-finds the right row instantly.

=INDEX(C2:C10, MATCH(1, (A2:A10=G1)*(B2:B10=G2), 0))

Pitfalls and Safety

Keep these in mind:

  • Equal ranges: every condition range and the INDEX column must share the same height.
  • No match: if no row meets all criteria, MATCH returns #N/A. Wrap the whole thing in IFERROR.
  • Duplicates: if more than one row matches, MATCH returns only the first. Make your criteria specific enough to be unique.
=IFERROR(INDEX(C2:C10, MATCH(1, (A2:A10=G1)*(B2:B10=G2), 0)), "No match")

SUMPRODUCT as an Alternative

If multiple rows can match and you would rather total their values than fetch one, SUMPRODUCT is a clean alternative to array-entered INDEX-MATCH.

It multiplies the condition arrays by the value column and adds the results, so only rows meeting both criteria contribute. No Ctrl+Shift+Enter is needed because SUMPRODUCT handles arrays natively.

Use INDEX-MATCH to pull a single matching value; use SUMPRODUCT to aggregate across all matches.

=SUMPRODUCT((A2:A10=G1) * (B2:B10=G2) * C2:C10)

Quick Check

Test your multi-criteria lookup knowledge.

Lesson Recap

For multi-criteria lookups with INDEX-MATCH:

  • Multiply condition arrays together: (A=G1)*(B=G2) gives 1 only where all hold (a logical AND).
  • MATCH(1, ..., 0) finds that row's position.
  • INDEX(returnCol, position) returns the value.

Add more *(range=criterion) factors for extra conditions, keep ranges equal in height, confirm with Ctrl+Shift+Enter in legacy Excel, and guard with IFERROR.

=INDEX(C2:C10, MATCH(1, (A2:A10=G1)*(B2:B10=G2), 0))

Frequently asked questions

Is the “Multi-Criteria Lookups With INDEX-MATCH” lesson free?

Yes — the full text of “Multi-Criteria Lookups With INDEX-MATCH” is free to read here on the web, and the Excel Formulas Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Excel Formulas Academy course, upgrade to CoddyKit PRO.

What will I learn in “Multi-Criteria Lookups With INDEX-MATCH”?

Match on several columns at once to pinpoint a row. You practise Excel Formulas Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Excel Formulas Academy?

No prior experience is required. Excel Formulas Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Multi-Criteria Lookups With INDEX-MATCH” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Excel Formulas Academy lesson?

Yes. Every Excel Formulas Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Two-Way Lookups With INDEX-MATCH-MATCH
  2. Looking Up the Last Matching Value
  3. Multi-Criteria Lookups With INDEX-MATCH
  4. Approximate Matching for Tier Tables
← Back to Excel Formulas Academy