In the ever-evolving landscape of data management, Excel continues to be a powerhouse tool for many professionals. One of its most recent and powerful features is the XLOOKUP function, which has significantly enhanced the way we perform lookups in Excel. Today, we're going to delve into the world of XLOOKUP with multiple criteria, a technique that can greatly simplify complex data analysis tasks.
Understanding XLOOKUP
Before we dive into using XLOOKUP with multiple criteria, let's ensure we have a solid grasp of the function itself. Introduced in Excel 365 and Excel 2021, XLOOKUP is designed to replace and improve upon older lookup functions like VLOOKUP, HLOOKUP, and INDEX MATCH. It's more intuitive, flexible, and powerful, making it a favorite among Excel users.
At its core, XLOOKUP searches for a specified item in a given array and returns a corresponding item from the same row or column. The syntax is straightforward: XLOOKUP(lookup_value, lookup_array, return_array). Here, lookup_value is the item you're searching for, lookup_array is the range where Excel will look for this item, and return_array is the range from which Excel will return the corresponding item.

XLOOKUP with Multiple Criteria: The Basics
Now, let's explore how we can use XLOOKUP to search for multiple criteria. In many real-world scenarios, we need to find data that matches more than one condition. For instance, you might want to find all products in a certain category that are also within a specific price range. This is where XLOOKUP's ability to handle multiple criteria shines.
To use XLOOKUP with multiple criteria, we'll need to adjust our syntax slightly: XLOOKUP(lookup_value1, lookup_value2, ..., lookup_array1, lookup_array2, ..., return_array). Each lookup_value and lookup_array pair represents a separate criterion. Excel will return a match only if all criteria are met.
Using AND and OR Operators
In some cases, you might want to find data that matches any one of the criteria, not all of them. For this, we can use the IFERROR function in conjunction with XLOOKUP. Here's the syntax: IFERROR(XLOOKUP(lookup_value1, lookup_array1, return_array), XLOOKUP(lookup_value2, lookup_array2, return_array)). In this example, Excel will return a match if either lookup_value1 is found in lookup_array1 or lookup_value2 is found in lookup_array2.

Practical Example: XLOOKUP with Multiple Criteria
Let's illustrate the power of XLOOKUP with multiple criteria using a practical example. Suppose we have a dataset of products with their categories, prices, and stock levels:
| Product | Category | Price | Stock |
|---|---|---|---|
| Product A | Electronics | 100 | 10 |
| Product B | Clothing | 50 | 5 |
| Product C | Electronics | 150 | 20 |
| Product D | Books | 25 | 15 |
We want to find all products that are in the 'Electronics' category and have a stock level greater than 10. We can achieve this with the following XLOOKUP formula: XLOOKUP(A2:A5, "Electronics", B2:B5, XLOOKUP(C2:C5, ">10", D2:D5, "Not Found")). Here, A2:A5 and B2:B5 represent the product names and categories, respectively. The first XLOOKUP function checks if the product is in the 'Electronics' category. The second XLOOKUP function, nested within the first, checks if the stock level is greater than 10. If both conditions are met, Excel returns the corresponding product name. If not, it returns "Not Found".
Tips and Tricks
- Wildcard Searches: You can use asterisks (*) in your lookup values to perform wildcard searches. For example,
XLOOKUP("Product*", A2:A5, B2:B5)will return all products that start with "Product". - Exact Match Mode: By default, XLOOKUP uses an approximate match mode. If you want to perform an exact match, you can add an optional
match_modeargument to your formula:XLOOKUP(lookup_value, lookup_array, return_array, , 0). Here, 0 represents an exact match. - Search Mode: Similarly, you can specify the search mode using the
search_modeargument:XLOOKUP(lookup_value, lookup_array, return_array, , , -1). Here, -1 represents a search mode that looks for the largest match less than the lookup value.
Excel's XLOOKUP function is a game-changer, offering unparalleled flexibility and power in data lookup and analysis. By mastering XLOOKUP with multiple criteria, you'll unlock a powerful tool for tackling complex data tasks efficiently and accurately. So, go ahead, explore, and harness the power of XLOOKUP in your Excel workflows!























