Advanced VLOOKUP With Multiple Criteria: 4 Formulas That Work

VLOOKUP can only match one value. When you need a result that depends on two or more conditions, such as an employee and a quarter, you need a different formula. This guide shows four ways to do an advanced VLOOKUP with multiple criteria, which one to use in your version of Excel, and how to fix the errors people usually hit.

📥 Download the practice file (VLOOKUP_vs_Advanced_MultiCriteria.xlsx)

Simple VLOOKUP: How It Works

VLOOKUP is usually the first lookup formula people learn. It searches the first column of a range and returns a value from a column to the right:

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
  • lookup_value: what you search for
  • table_array: the range to search, with the lookup column first
  • col_index_num: which column of that range to return
  • range_lookup: FALSE for an exact match (use this almost every time)

Example 1: Simple VLOOKUP

Here is a small list of employees and departments:

Excel table of employee names and departments used for a simple VLOOKUP example

To find Clara's department:

=VLOOKUP("Clara", B2:C5, 2, FALSE)

Result: IT

This is how the formula looks in the worksheet:

Simple VLOOKUP formula entered in an Excel worksheet

And the result:

Result of a simple VLOOKUP returning Clara's department

Why Simple VLOOKUP Isn't Enough

Real business data rarely has one row per name. A sales list has the same person once per quarter, region or product, so a lookup on the name alone returns the first row it finds, which is often the wrong one. Take this table:

Employee ID Name Quarter Sales Target
101 Alice Q1 45,000
101 Alice Q2 50,000
102 Brian Q1 35,000
102 Brian Q2 42,000
103 Clara Q1 55,000
103 Clara Q2 61,000

The question is: what is Clara's target for Q2? VLOOKUP on "Clara" would return 55,000 (her Q1 row). You need a lookup that checks the name and the quarter.

Method 1: INDEX + MATCH With Multiple Criteria (Works in Every Version)

=INDEX(D2:D7, MATCH(1, (B2:B7="Clara")*(C2:C7="Q2"), 0))

Result: 61,000

How it works

  • (B2:B7="Clara") returns TRUE/FALSE for each row: {FALSE, FALSE, FALSE, FALSE, TRUE, TRUE}.
  • (C2:C7="Q2") returns {FALSE, TRUE, FALSE, TRUE, FALSE, TRUE}.
  • Multiplying them turns TRUE into 1 and FALSE into 0, giving {0, 0, 0, 0, 0, 1}. The 1 marks the only row where both conditions are true.
  • MATCH(1, …, 0) finds the position of that 1, and INDEX returns the Sales Target from that row.
Excel 2019 or earlier: this is an array formula, so confirm it with Ctrl + Shift + Enter instead of Enter. Excel shows curly braces around it when it's entered correctly. In Microsoft 365 and Excel 2021, Enter is enough.

Here is the same approach in a worksheet:

INDEX and MATCH formula with multiple criteria in Excel

And the results:

Results of a multiple criteria lookup in Excel

Method 2: XLOOKUP With Multiple Criteria (Microsoft 365, Excel 2021 and Later)

XLOOKUP does the same job with a shorter formula, and you don't need Ctrl + Shift + Enter:

=XLOOKUP(1, (B2:B7="Clara")*(C2:C7="Q2"), D2:D7, "Not found")

Result: 61,000. The fourth argument is what to show when nothing matches, so you don't need IFERROR.

Method 3: FILTER to Return Every Match

INDEX/MATCH and XLOOKUP return the first match only. If several rows can meet the conditions and you want all of them, use FILTER (Microsoft 365 and Excel 2021):

=FILTER(D2:D7, (B2:B7="Clara")*(C2:C7="Q2"), "Not found")

The results spill into the cells below, one per matching row.

Method 4: SUMIFS When the Result Is a Number

If the value you want is a number and each combination of conditions appears only once, SUMIFS is the simplest option and works in every version:

=SUMIFS(D2:D7, B2:B7, "Clara", C2:C7, "Q2")

Result: 61,000. Be careful: if the same combination appears twice, SUMIFS adds both rows together, and if there's no match it returns 0 instead of an error.

What About Helper Columns?

Many tutorials join the columns into a helper key, such as =B2&"-"&C2, and run a normal VLOOKUP on it. That works, but the extra column clutters the sheet, has to be copied down whenever data is added, and breaks if someone sorts or deletes it. The formulas above avoid all of that.

Which Method Should You Use?

MethodExcel versionReturnsBest for
INDEX + MATCHAll versions (Ctrl + Shift + Enter in 2019 and earlier)First matchFiles shared with people on older Excel
XLOOKUPMicrosoft 365, Excel 2021+First match (or last)The cleanest formula if everyone has a current version
FILTERMicrosoft 365, Excel 2021+Every matchWhen more than one row can match
SUMIFSAll versionsTotal of matching rowsNumbers where each combination is unique
VLOOKUP + helper columnAll versionsFirst matchQuick, one-off sheets

Common Errors and How to Fix Them

  • #N/A: nothing matched. Check for extra spaces (wrap the column in TRIM) and for numbers stored as text, such as an ID of 101 typed as "101".
  • #VALUE! or a wrong result: the ranges are different sizes. B2:B7, C2:C7 and D2:D7 must all start and end on the same rows.
  • Only the first result shows: that's expected for INDEX/MATCH and XLOOKUP. Use FILTER if you need every match.
  • Formula works on your PC but not a colleague's: they're probably on an older Excel without XLOOKUP or FILTER. Use INDEX + MATCH for shared files.

A Realistic Business Example

A retail chain tracks sales targets for each salesperson by region, product line and quarter. A plain VLOOKUP on the employee ID can only return one target. With a multiple criteria lookup, a manager can pull exactly the number they need, for example:

  • Alice's Q2 target for Apparel in the East region
  • Brian's Q1 target for Electronics in the West region

Because the formula reads the conditions from cells, the same formula can sit in a dashboard and update when someone picks a different name, region or quarter from a dropdown.

Practice Data

Copy this into a sheet named Sales_Data to try the formulas yourself:

Emp_ID Name Region Quarter Product Target
101AliceEastQ1Electronics48000
101AliceEastQ2Apparel52000
102BrianWestQ1Electronics36000
102BrianWestQ2Apparel41000
103ClaraNorthQ1Furniture57000
103ClaraNorthQ2Electronics62000
104DavidSouthQ1Apparel43000
104DavidSouthQ2Furniture49000

Formula example: find Clara's Electronics target in Q2 for the North region:

=INDEX(F2:F9, MATCH(1, (C2:C9="North")*(B2:B9="Clara")*(D2:D9="Q2")*(E2:E9="Electronics"), 0))

Result: 62,000. In Microsoft 365 the XLOOKUP version is:

=XLOOKUP(1, (C2:C9="North")*(B2:B9="Clara")*(D2:D9="Q2")*(E2:E9="Electronics"), F2:F9, "Not found")

Frequently Asked Questions

Can VLOOKUP use multiple criteria?

Not on its own. VLOOKUP matches one value in one column. To check two or more conditions, use INDEX with MATCH, XLOOKUP, FILTER or SUMIFS, or add a helper column that joins the conditions into one key.

What is the best alternative to VLOOKUP with multiple criteria?

In Microsoft 365 or Excel 2021, XLOOKUP is the simplest. If the file will be opened in older versions of Excel, use INDEX with MATCH, which works everywhere.

Why does my INDEX MATCH multiple criteria formula return #N/A?

Usually one of three things: a condition has extra spaces or numbers stored as text, the ranges are different sizes, or in Excel 2019 and earlier the formula was entered with Enter instead of Ctrl + Shift + Enter.

How do I return all matches instead of the first one?

Use FILTER in Microsoft 365 or Excel 2021. It returns every row that meets the conditions and spills the results into the cells below.

Stuck on a Lookup That Won't Work?

Our Excel experts fix broken lookups, slow workbooks and messy data every day. Send the file and get a fixed quote, usually within the hour.

Post a Project

Related Guides