How to Xlookup With Multiple Criteria in Excel

Learn multiple Excel methods to XLOOKUP with multiple criteria, complete with step-by-step examples, best practices, and real-world applications.

excelformulaspreadsheettutorial
12 min read • Last updated: 7/2/2025

How to Xlookup With Multiple Criteria in Excel

Why This Task Matters in Excel

Every analyst eventually bumps into a situation where a single lookup condition is not enough. Imagine a sales database where the same product code is repeated for different regions, or a staff roster where an employee ID can be found across several departments due to secondments. When you try to pull the price, the commission rate, or the latest performance rating with a normal lookup, you risk returning the wrong row because the lookup is not unique. That is where a multi-criteria XLOOKUP becomes crucial.

Multi-criteria lookups power dashboards, reconciliation models, and operational templates in finance, logistics, HR, and supply-chain management. Procurement teams use them to fetch contracted price lists by matching on supplier name plus SKU. HR analysts combine employee ID and effective-date to bring back correct pay-band details. Customer service supervisors match account number plus service tier to fetch escalation paths. In each case, returning the wrong row can distort cost allocations, bonus calculations, or compliance reports—mistakes that ripple through the organisation.

Excel is still the world’s most widespread analytical platform because it offers functions that combine flexibility with transparency. XLOOKUP, introduced in Microsoft 365 and Excel 2021, brings additional power over older LOOKUP functions: it searches left-to-right or right-to-left, it supports optional error returns, and it can spill arrays. Most importantly for our task, XLOOKUP works seamlessly with dynamic arrays, allowing us to join criteria on the fly. When you master multi-criteria XLOOKUP formulas, you unlock faster model build-outs, reduce the need for helper columns, and keep workbooks smaller and easier to audit. Conversely, if you rely on manual filters or concatenation hacks, you risk broken formulas, hidden duplicates, and hours of unnecessary troubleshooting. Multi-criteria lookups therefore sit at the intersection of clean data modelling, accurate analysis, and efficient workflow design.

Best Excel Approach

The most elegant way to do a lookup with multiple criteria in modern Excel is to create a single lookup array by combining (multiplying or concatenating) the individual criteria arrays, then run one XLOOKUP against that combined array. Thanks to dynamic array evaluation, you do not need permanent helper columns; the formula builds the composite key in memory each time it calculates. You should use this approach when:

  • You have Microsoft 365 or Excel 2021 (or later)
  • You want one compact formula without extra columns
  • Your datasets are not so large that array calculations cause noticeable delays

The logic works like this: for each row, build a unique “signature” by joining the columns that must jointly identify the row. Then build the same signature for the lookup values. Because text concatenation sometimes creates ambiguous keys (for example, “AB”+“C” equals “A”+“BC”), a safer technique is to use Boolean multiplication. Each individual criteria test returns TRUE or FALSE (treated as 1 or 0). The product equals 1 only when all criteria are TRUE in the same row.

General syntax (Boolean multiplication method):

=XLOOKUP(1,
        (criteria1_range=criteria1_value)*
        (criteria2_range=criteria2_value)*
        (criteria3_range=criteria3_value),
        return_range,
        "Not found")

Alternatively, when you prefer text concatenation (useful when criteria may repeat but the combined string stays unique):

=XLOOKUP(criteria1_value&"|"&criteria2_value,
        criteria1_range&"|"&criteria2_range,
        return_range,
        "Not found")

The Boolean method is safer with numeric or mixed data types; the concatenation method is more readable for pure text keys. Both avoid permanent helper columns, keep models tidy, and recalculate instantly on typical worksheet sizes.

Parameters and Inputs

To build a robust multi-criteria XLOOKUP, you need three classes of inputs:

  1. Criteria Ranges
  • Each range must have the same row count as the return range.
  • Data types should be consistent—dates stored as true dates, numbers as numbers.
  • Avoid stray spaces and non-breaking characters in text columns.
  1. Criteria Values (Lookup Inputs)
  • Can be literal values in the formula, cell references, or spilled arrays.
  • Validate them with Data Validation lists or dropdowns to prevent typos.
  • If any criteria may be blank, decide whether a blank should qualify or disqualify a row and code accordingly.
  1. Return Range
  • Single column or row containing the value you want to fetch.
  • Must align perfectly with criteria ranges—no extra headers or misaligned rows.
  • Ensure the data type here matches downstream calculations (for example, currency formatted as number, not text).

Optional parameters include the match mode and search mode arguments of XLOOKUP. In most multi-criteria cases you leave these at defaults (exact match). However, if you build thresholds such as “date less than or equal to selected date,” you can wrap criteria in MAXIFS/MINIFS or FILTER prior to XLOOKUP, or add a search mode of −1 to find the last matching row. For very large tables, consider converting ranges to Excel Tables; structured references keep formulas legible and automatically expand when new rows are added.

Step-by-Step Examples

Example 1: Basic Scenario

Imagine a small sales commission table. Each product code can appear twice: once for Retail and once for Wholesale. Your goal is to return the commission rate based on both product code and channel without inserting helper columns.

Sample data (in [A2:C9]):

ProductChannelCommission
P-100Retail3%
P-100Wholesale2%
P-200Retail4%
P-200Wholesale3%
P-300Retail5%
P-300Wholesale4%

Input cells:

  • [E2] Product lookup (e.g., P-200)
  • [F2] Channel lookup (e.g., Wholesale)

Formula in [G2]:

=XLOOKUP(1,
        ([A3:A9]=E2)*([B3:B9]=F2),
        [C3:C9],
        "No match")

Step-by-step:

  1. ([A3:A9]=E2) produces an array of TRUE/FALSE values matching the product.
  2. ([B3:B9]=F2) does the same for the channel.
  3. Multiplying the two arrays yields 1 where both conditions are TRUE in the same row, else 0.
  4. The lookup_value argument is 1, telling XLOOKUP to find the row where the combined condition equals 1.
  5. XLOOKUP returns the Commission from [C3:C9].

Why it works: Because the multiplication converts TRUE to 1 and FALSE to 0, only a row meeting both conditions returns a 1. XLOOKUP finds the first 1 and fetches the aligned commission.

Common variations:

  • If you need the nth match, wrap the formula in INDEX(FILTER()) instead; more on that in the advanced example.
  • If channel may be blank, change ([B3:B9]=F2) to ( (F\2=\"\") + ([B3:B9]=F2) ) to treat blank criteria as “match any.”

Troubleshooting: If you get “Not Found” unexpectedly, check for leading or trailing spaces in [Channel] by using LEN() or TRIM().

Example 2: Real-World Application

Scenario: An HR analytics team tracks employee allowances. Allowances vary by Employee ID and Effective Date (many records per person). You must retrieve the allowance rate valid on a specific date for payroll.

Data (Employee_Lookup table) in [A2:D1000]:

EmpIDEffectiveDateAllowanceStatus
E-01401-Jan-2021120Active
E-01401-Jul-2021130Active
E-01401-Jan-2022150Active
E-051

Business Requirement: For EmpID in [H3] and PayDate in [I3], return the rate whose EffectiveDate is the latest date less than or equal to PayDate.

Because we need a “latest on or before” match, we pair FILTER with SORT in descending order, then XLOOKUP.

Formula in [J3]:

=LET(
    emp, H3,
    pdate, I3,
    subset, FILTER(Employee_Lookup[Allowance],
           (Employee_Lookup[EmpID]=emp)*
           (Employee_Lookup[EffectiveDate]<=pdate)),
    rates, SORT(subset,1,-1),
    XLOOKUP(TRUE, rates<>0, rates)
)

Explanation:

  1. FILTER narrows the table to rows for the selected employee where EffectiveDate ≤ PayDate.
  2. SORT orders the resulting allowances by EffectiveDate descending (largest to smallest).
  3. The first non-zero rate is now the most recent valid record.
  4. XLOOKUP(TRUE, rates<>0, rates) returns that first element.

Integration with other features: Because Employee_Lookup is an Excel Table, new allowance rows automatically become part of the lookup. You can wrap the formula in IFERROR to default to zero when an employee has no allowance history.

Performance notes: Even with [1,000+] records, this dynamic array performs instantly. If your dataset grows to tens of thousands, convert to Power Query for loading and step through the same logic in a query pipeline, then bring the results back to the sheet.

Example 3: Advanced Technique

Edge Case: You need to return multiple columns (e.g., Price, Discount, Stock) for a product that is identified by three criteria—Item code, Region, and Year. And you want the entire row to spill horizontally without helper columns.

Data table [A1:F5000]:

| Item | Region | Year | Price | Discount | Stock |

Inputs in [H2:H4]:

CriterionValue
ItemIT-550
RegionEast
Year2024

Return range desired starting in [J2].

Formula:

=LET(
    key, (A2:A5000=H3)*(B2:B5000=H4)*(C2:C5000=H5),
    rowNum, XMATCH(1, key),
    result, INDEX(D2:F5000, rowNum, ),
    result
)

Alternate single-cell XLOOKUP without helper LET:

=XLOOKUP(1,
        (A2:A5000=H3)*(B2:B5000=H4)*(C2:C5000=H5),
        D2:F5000)

Because the return_array is three columns wide, XLOOKUP spills all three results across [J2:L2]. This is perfect for dashboards requiring multiple related metrics.

Performance optimisation:

  • Wrap the Boolean test in --() to coerce TRUE to 1 explicitly if regional settings require it.
  • Limit the ranges to Excel Tables (e.g., Inventory[Item]) to reduce audit risk.
  • If calculation lag appears, clear unused conditional formats and set Workbook Calculation to Automatic Except Data Tables.

Error handling: when no row matches, XLOOKUP returns #N/A. Replace with IFNA to display “No data.”

Tips and Best Practices

  1. Convert source data to Excel Tables so range references stay aligned as you add rows; formulas automatically adjust and remain readable through structured names.
  2. Use the LET function for complex multi-criteria lookups. LET names your arrays, shortens formulas, and avoids repeating calculations, giving performance boosts on large spreadsheets.
  3. When concatenating text criteria, insert a delimiter unlikely to appear in the data (for example, “|”). This minimises accidental collisions where two key parts blend into the same string.
  4. Validate lookup values with drop-down lists. This eliminates the top cause of lookup errors—typos and inconsistent capitalisation.
  5. Combine XLOOKUP with IFERROR or IFNA to return user-friendly messages such as “No matching record” rather than showing errors on client-facing sheets.
  6. For very large tables (100,000+ rows), consider Power Query to stage data. Load a clean dimension table into Excel and then use XLOOKUP on the smaller set for snappy interactivity.

Common Mistakes to Avoid

  1. Misaligned ranges: If your criteria ranges and return range are different sizes, XLOOKUP throws a spill error or returns wrong rows. Make sure every array covers the same number of rows.
  2. Hidden spaces in text columns: A trailing space in “Wholesale ” breaks an exact match. Use TRIM on the dataset upfront or wrap criteria in TRIM.
  3. Forgetting to coerce TRUE/FALSE to numeric: When regional settings treat TRUE*TRUE as zero, the lookup fails. Prefix with -- to force conversion.
  4. Using concatenation without delimiter: “AB”&“C” equals “A”&“BC”. Ambiguous keys jeopardise uniqueness. Always separate parts with a distinct delimiter.
  5. Overlooking case sensitivity: XLOOKUP is case-insensitive. If you must distinguish “abc” from “ABC,” use EXACT inside FILTER or use a helper column instead.

Alternative Methods

Below is a quick comparison of methods to perform multi-criteria lookups.

MethodExcel VersionHelper Column RequiredArray FormulaProsCons
XLOOKUP with Boolean multiplication365 / 2021NoYesSingle compact formula, spills rows or columns, easy to auditNot available in Excel 2019- or earlier
INDEX/MATCH with MATCH 1All versionsNoYesWorks in legacy versions, flexibleSlightly longer formula, no built-in error argument
INDEX with MATCH on helper column2007-2021YesNoSimple thinking, fast on large tablesExtra column clutters sheet
FILTER + INDEX/CHOOSECOLS365 / 2021NoYesCan return multiple matches, array capableRequires dynamic arrays, heavier calculation
Power Query mergeExcel 2010+ (with add-in)NoNoHandles millions of rows, refreshableRequires load/refresh cycle, not real-time on sheet

Use XLOOKUP when you need real-time results and have a modern Excel subscription. Fall back to INDEX/MATCH when distributing workbooks to colleagues with older versions. Power Query becomes attractive for ETL and extremely large datasets.

FAQ

When should I use this approach?

Use multi-criteria XLOOKUP whenever the column you want is unique only when more than one condition is true—product plus region, customer plus year, employee plus date, and so forth. It is overkill for columns that are already unique on a single ID.

Can this work across multiple sheets?

Yes. Simply qualify ranges with sheet names, for example: ='Data Sheet'!A2:A1000. All criteria arrays and the return array can live on another sheet, even another workbook (when both books are open). Ensure the workbook links remain updated.

What are the limitations?

The approach requires Excel 365 or 2021 for XLOOKUP. Array operations on very large datasets (hundreds of thousands of rows) may slow recalculation. Case-insensitive matching can be a drawback when case matters.

How do I handle errors?

Wrap the formula in IFNA or IFERROR to replace #N/A with a user message. For example: =IFNA( your_XLOOKUP , "Record not found"). Also validate input cells with Data Validation to reduce error occurrences.

Does this work in older Excel versions?

XLOOKUP is not available in Excel 2019 or earlier. Use an INDEX/MATCH combo instead:

=INDEX(return_range,
       MATCH(1,
            (criteria1_range=criteria1_value)*
            (criteria2_range=criteria2_value),0))

Confirm with Ctrl+Shift+Enter in versions before dynamic arrays.

What about performance with large datasets?

Turn calculation to Manual while editing. Use LET to avoid repeated calculations, and reference Excel Tables rather than entire columns. For very large data models, offload heavy joins to Power Query or a database.

Conclusion

Multi-criteria lookups are a cornerstone skill for reliable data models. By mastering XLOOKUP with Boolean multiplication or text concatenation, you can replace fragile helper columns and surface the correct row every time. This boosts accuracy, compresses formula footprints, and streamlines audits. As you grow comfortable, explore dynamic spill ranges, LET names, and integration with FILTER for even richer analytics. Keep practicing on your own datasets, and you will soon treat multi-criteria lookups as a natural extension of your Excel toolbox—one more step toward becoming the go-to spreadsheet expert in your organisation.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.