ExcelReady
CourseFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before the interview. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Function guides
  • Blog

Product

  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Lookups
  3. Lookup With Multiple Criteria in Excel

Lookup With Multiple Criteria in Excel

By ExcelReady Team·Updated October 30, 2026·6 min read

The short answer

To look up a value that must match two or more criteria, multiply the tests and look up 1: =XLOOKUP(1,(A2:A8=F2)(B2:B8=F3),C2:C8). Each test gives 1 for TRUE and 0 for FALSE, so only rows that pass every test become 1. In Excel 2019 and earlier, use =INDEX(C2:C8,MATCH(1,(A2:A8=F2)(B2:B8=F3),0)) or a helper column.

Key takeaways

  • Multiply tests to make AND logic: (A2:A8=F2)*(B2:B8=F3) is 1 only where both match.
  • =XLOOKUP(1,tests,return_range) returns the first row where every test is TRUE.
  • INDEX MATCH with MATCH(1,tests,0) does the same in older Excel, entered with Ctrl+Shift+Enter in 2019 and earlier.
  • A helper column that joins the keys, such as =A2&"|"&B2, works with VLOOKUP in every version.
  • If the result is a number and each combination is unique, SUMIFS is the simplest option.
On this page+
  1. Why a normal lookup isn't enough
  2. How to do a lookup with multiple criteria using XLOOKUP
  3. XLOOKUP with joined keys: another way
  4. How to do it with INDEX and MATCH (older Excel)
  5. How to do it with a helper column (any version)
  6. The SUMIFS shortcut for numbers
  7. Common mistakes in multiple-criteria lookups
  8. Practise it

A lookup with multiple criteria finds the row where two or more columns all match, such as the price of a Hoodie in size M. Normal VLOOKUP and XLOOKUP only search one column, so you combine the criteria first. This guide shows the modern XLOOKUP method, the INDEX MATCH version for older Excel, a helper column that works everywhere, and when SUMIFS is simpler still.

Why a normal lookup isn't enough#

A normal lookup stops at the first row that matches one value, which is often the wrong row. Here is a price list where the same product appears in several sizes:

ABC
1ProductSizePrice
2T-shirtS12
3T-shirtM13
4T-shirtL14
5HoodieS30
6HoodieM32
7HoodieL34
8CapOne size15

F2 holds Hoodie and F3 holds M. =XLOOKUP(F2,A2:A8,C2:C8) returns 30, the price of the first Hoodie row (size S). You need a lookup that checks the product and the size.

How to do a lookup with multiple criteria using XLOOKUP#

Look up the number 1 in an array built by multiplying the tests:

Excel formula
=XLOOKUP(1,(A2:A8=F2)*(B2:B8=F3),C2:C8)

The result is 32. Here is what happens, row by row:

RowA2:A8=F2B2:B8=F3Multiplied
T-shirt SFALSEFALSE0
T-shirt MFALSETRUE0
Hoodie STRUEFALSE0
Hoodie MTRUETRUE1
Hoodie LTRUEFALSE0

When you multiply TRUE and FALSE values, Excel treats TRUE as 1 and FALSE as 0. Only a row that passes both tests gives 1 × 1 = 1. XLOOKUP then finds the first 1 and returns the price from that row.

Add a third test by multiplying again, for example *(D2:D8="Blue"). Each test must be wrapped in its own brackets, and every range must have the same number of rows. Add the optional fourth argument to show a message instead of #N/A: =XLOOKUP(1,(A2:A8=F2)*(B2:B8="XL"),C2:C8,"Not found") returns Not found. XLOOKUP needs Excel 2021, Microsoft 365 or Excel for the web; the XLOOKUP function guide covers its other arguments.

You can also return more than one column. Make the return array wider, for example =XLOOKUP(1,(A2:A8=F2)*(B2:B8=F3),B2:C8), and the result spills across two cells: the size and the price of the matching row. Leave the cell to the right empty so the result has room.

XLOOKUP with joined keys: another way#

You can also join the criteria into one text key with &, on both sides:

Excel formula
=XLOOKUP(F2&"|"&F3,A2:A8&"|"&B2:B8,C2:C8)

F2&"|"&F3 becomes Hoodie|M, and A2:A8&"|"&B2:B8 builds the same kind of key for every row. The result is again 32.

The | separator matters. Without it, "AB" + "C" and "A" + "BC" would both become "ABC" and could match the wrong row. The multiplication method avoids that problem and also handles conditions such as C2:C8>=32, which joined keys can't, so it's usually the better choice.

How to do it with INDEX and MATCH (older Excel)#

In Excel 2019 and earlier, use the same multiplied tests inside MATCH:

Excel formula
=INDEX(C2:C8,MATCH(1,(A2:A8=F2)*(B2:B8=F3),0))

MATCH finds the position of the first 1 (row 5 of the range), and INDEX returns the 5th price: 32. The 0 at the end of MATCH means exact match.

In Excel 2019 and earlier, this is an array formula: press Ctrl+Shift+Enter instead of Enter (on a Mac, ⌃⇧Return also works). Excel shows curly braces around it in the formula bar. In Excel 2021 and Microsoft 365, a normal Enter is enough. If INDEX MATCH is new to you, start with the INDEX MATCH guide, which explains each part on a single criterion.

How to do it with a helper column (any version)#

A helper column joins the criteria on the sheet, so a plain VLOOKUP can search it.

Step 1: Add a key column on the left#

Insert a column before the table, or use a spare column at the left. In it, type =A2&"|"&B2 and fill down. Each row now has a key such as Hoodie|M.

Step 2: Look up the joined value#

If the key is in column A and the price is now in column D, use:

Excel formula
=VLOOKUP(F2&"|"&F3,A2:D8,4,FALSE)

This works in every version of Excel, and anyone can see how it works by looking at the key column. The cost is an extra column to maintain.

The SUMIFS shortcut for numbers#

If the value you want is a number, and each combination appears only once, SUMIFS gives the same answer without any array logic:

Excel formula
=SUMIFS(C2:C8,A2:A8,F2,B2:B8,F3)

The result is 32. Be careful, though: if a combination appears twice, SUMIFS adds both prices instead of returning one, and if there's no match it returns 0 instead of an error. Use it only when you're sure the combinations are unique.

Common mistakes in multiple-criteria lookups#

  • Using AND instead of *. AND(A2:A8=F2,B2:B8=F3) returns one TRUE or FALSE for the whole range, so the lookup fails.
  • Forgetting the brackets around each test. A2:A8=F2*B2:B8=F3 is calculated in the wrong order.
  • Ranges of different sizes, such as A2:A8 and B2:B9, which return #VALUE!.
  • Numbers stored as text, so a test like A2:A8=101 finds nothing. Make both sides the same type.
  • Expecting every match. These formulas return the first matching row only. To list all matches, see return every match for a lookup with FILTER. To get the most recent match instead of the first, see find the last match with XLOOKUP.

Multiple-criteria lookups are a common step up in interviews and data tests, after a basic VLOOKUP; see the Excel interview questions and the Excel skills for data analysts.

Practise it#

Try the live exercise on this page to find the Hoodie M price. Then practise INDEX and MATCH in a live spreadsheet to see how position-based lookups work, and use the XLOOKUP lesson to get quick with the modern syntax before combining criteria.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Prices depend on both product and size. In G2, use XLOOKUP to return the price for the product in F2 and the size in F3. Look up 1 in (A2:A8=F2)*(B2:B8=F3) and return from C2:C8.

fx
ABCDEFGH
1
Product
Size
Price
Price
2
T-shirt
S
12
Product
Hoodie
3
T-shirt
M
13
Size
M
4
T-shirt
L
14
5
Hoodie
S
30
6
Hoodie
M
32
7
Hoodie
L
34
8
Cap
One size
15
9
10
11

Tip: The lookup value is 1. The lookup array is the two tests in brackets, multiplied. The return array is C2:C8.

Practise this in a lesson

LessonINDEX and MATCHCombine INDEX and MATCH to look up in any direction, including returning a column to the left of the one you search.LessonXLOOKUPLook up in any direction with XLOOKUP and show a friendly message when nothing matches.Function guideXLOOKUPXLOOKUP explained with real examples: exact matches, looking left and custom not-found messages, plus a live exercise to try now.Function guideINDEXLearn the Excel INDEX function: return a value by row and column position, build two-way lookups with MATCH, and practice live.Function guideMATCHLearn how Excel's MATCH finds the position of a value, why the 0 matters, and how it powers INDEX/MATCH. Includes a live exercise.

Frequently asked questions

Can XLOOKUP use multiple criteria?

+

Yes. Use 1 as the lookup value and multiply the tests as the lookup array: =XLOOKUP(1,(A2:A8=F2)*(B2:B8=F3),C2:C8). It works in Excel 2021, Microsoft 365 and Excel for the web.

Can VLOOKUP look up with two criteria?

+

Not on its own. Add a helper column that joins the two keys, such as =A2&"|"&B2, put it first in the table, and look up F2&"|"&F3 with VLOOKUP.

Why use multiplication instead of AND?

+

AND returns one TRUE or FALSE for the whole range, not one result per row. Multiplying two ranges of TRUE/FALSE gives a 1 or 0 for each row, which is what the lookup needs.

What happens if more than one row matches all the criteria?

+

XLOOKUP and INDEX MATCH return the first matching row. To get every match, use FILTER instead; to get the last one, use XLOOKUP with search_mode -1.

Do I need Ctrl+Shift+Enter for a multiple-criteria lookup?

+

Only for the INDEX MATCH version in Excel 2019 and earlier. In Excel 2021 and Microsoft 365, press Enter as normal.

Sources

  • XLOOKUP function - Microsoft Support
  • INDEX function - Microsoft Support
  • MATCH function - Microsoft Support

Written and checked by the ExcelReady Team. First published October 30, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. Why a normal lookup isn't enough
  2. How to do a lookup with multiple criteria using XLOOKUP
  3. XLOOKUP with joined keys: another way
  4. How to do it with INDEX and MATCH (older Excel)
  5. How to do it with a helper column (any version)
  6. The SUMIFS shortcut for numbers
  7. Common mistakes in multiple-criteria lookups
  8. Practise it

Keep reading

Lookups· 6 min read

Return Every Match for a Lookup in Excel (FILTER)

VLOOKUP and XLOOKUP stop at the first match. To return every match, use FILTER: =FILTER(B2:B7,A2:A7=F2) lists all the orders for the customer in F2, spilling one per row. Add a third argument such as "No orders" for when nothing matches, and wrap it in TEXTJOIN to put all matches in one cell. FILTER needs Excel 2021 or Microsoft 365.

Lookups· 7 min read

Find the Last Match in Excel With XLOOKUP

To find the last match, set XLOOKUP's sixth argument, search_mode, to -1 so it searches from the bottom up: =XLOOKUP(F2,A2:A8,C2:C8,"Not found",0,-1). It returns the value from the last row where column A equals F2, such as the most recent price in a list sorted oldest first. XLOOKUP needs Excel 2021 or Microsoft 365.

Tests & careers· 5 min read

25 Excel Interview Questions (With Answers You Can Practise)

Common Excel interview questions cover formulas and order of operations, relative and absolute ($) references, VLOOKUP, INDEX MATCH and XLOOKUP, IF with AND or OR, COUNTIFS and SUMIFS, pivot tables, filters and fixing errors. Good answers name the function, give its arguments in order and explain one limitation or edge case.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback. The first lessons are free, with no download.

Start learning for free