toolrota

Excel lookup with multiple criteria: XLOOKUP, FILTER and INDEX MATCH

VLOOKUP isn't enough for two-condition lookups such as finding a price by product and region. We explain multi-criteria lookup methods with examples.

Serkan Akyürek··3 min read
Excel lookup with multiple criteria: XLOOKUP, FILTER and INDEX MATCH – Excel

VLOOKUP searches by one value. But what if you need a price by both product name and region? Excel offers several methods for multi-criteria lookup: using XLOOKUP by multiplying the conditions, returning all matches with FILTER, writing an array formula with INDEX MATCH, or adding a helper column for older versions.

Comparing the methods

MethodVersionResult
XLOOKUP with condition productMicrosoft 365, 2021First match
FILTERMicrosoft 365, 2021All matches
INDEX MATCH array formulaAll versionsFirst match
Helper column + VLOOKUPAll versionsFirst match, simplest

Multiple criteria with XLOOKUP

The logic: the expression (Product=wanted product) * (Region=wanted region) gives 1 on rows that meet both conditions and 0 elsewhere. In XLOOKUP you use 1 as the lookup value and this product as the lookup array. For details see our XLOOKUP guide.

All matches with FILTER

If you expect more than one result, give FILTER the product of the two conditions. It returns every row that meets them as a spilled list. Our dynamic arrays guide covers this in detail.

Setting up a multi-criteria lookup
  1. 1

    Type the lookup conditions in separate cells

  2. 2

    Write expressions comparing each condition with its column

  3. 3

    Multiply the expressions to get one array of 1s and 0s

  4. 4

    Return the result with XLOOKUP or FILTER

  5. 5

    Show a message with IFNA when nothing matches

The helper column method

For older versions the clearest route is a helper column joining product and region (for example "Pen-Aegean"). Then join the lookup value the same way and use VLOOKUP. For joining see our CONCATENATE guide, and for VLOOKUP our VLOOKUP guide.

When you need a total

If you want the total of several matches, use SUMIFS instead of a lookup; see our SUMIFS guide.

Common mistakes

  1. Trying to combine conditions with AND. AND returns one result instead of an array; use multiplication.
  2. Ranges of different sizes. All columns must have the same number of rows.
  3. Data with extra spaces. Clean it with TRIM; see our data cleaning guide.
  4. Not noticing there are several matches. XLOOKUP returns only the first.

Frequently asked questions

Can I use three conditions? Yes, add a third expression to the product.

How do I build "or" logic? Add the conditions instead of multiplying them and filter on results greater than zero.

Summary

Multiplying conditions is the most powerful method for multi-criteria lookups. Use XLOOKUP and FILTER in newer versions and a helper column in older ones.

Share
Published:
Author
Serkan Akyürek

Serkan Akyürek is the founder and author of toolrota; he writes step-by-step guides on Excel, AI, the cloud, personal finance and digital security.