It is a flexible and versatile function that can solve a wide variety of lookup problems.

The formula in H5 is:

More detailed explanation here.

The example below shows how XLOOKUP can be used to return three values with a single formula.

XLOOKUP - basic exact match example

All three values are returned andspillinto the range C5:E5.

In the example above, we use XLOOKUP to return multiple values from the same matching record.

Example #4 - Two-way lookup

XLOOKUP can perform a two-way lookup bynestingone XLOOKUP inside another.

XLOOKUP - basic exact match example

Typical values fornot_foundinclude “Not found”, “No match”, “No result”, etc.

Example #6 - Wildcard match

XLOOKUP supports wildcards to enable partial match lookups.

Set thematch_modeargument to 2 to enable wildcards in XLOOKUP.

XLOOKUP - basic exact match example

For a slightly simpler formula,see this page.

This problem is trickier than it looks.

Each product code begins with 3 uppercase letters and ends with 2 or 3 uppercase letters.

XLOOKUP - basic exact match example

In the middle of the product code is a number between 2 and 4 digits.

A wildcard match won’t work because a number like 56 can appear insideother product codes.

However, we can easily solve this problem with a “regex match”.

XLOOKUP - basic exact match example

To enable a regex match in XLOOKUP, provide 3 formatch_mode.

Then supply a valid regex pattern as the lookup_value.

Regex is a powerful and somewhat complex language.

XLOOKUP - basic approximate match example

For a detailed explanation of this particular example (including the workbook),see this page.

Regex is a complicated and deep topic.

For an introduction to regex in Excel, seeRegular Expressions in Excel.

XLOOKUP - multiple value example

Regex support in XLOOKUP is only available in Excel 365.

Example #8 - multiple criteria

One common challenge with XLOOKUP is how to apply multiple criteria.

This sounds complicated, but it is quite straightforward.

XLOOKUP - two-way lookup example

Notice the sixth value in the array is 1.

This corresponds to the sixth row in the data, which contains a Medium Blue Hoodie.

For more details and to download the worksheet,see this page.

XLOOKUP - not found example

The formula in G5 looks like this:

Seethis pagefor a more detailed explanation of how this formula works.

To use binary search mode, data must be sorted in ascending or descending order.

If values are sorted inascending order, use the value 2 forsearch_mode.

XLOOKUP - contains substring example

If values are sorted indescending order, use the value -2.

Match mode options

By default, XLOOKUP will perform anexact match.

TheXMATCH functionwas also updated to support regex.

XLOOKUP - regex match example

For more about regex in Excel, seeRegular Expressions in Excel.

Search mode options

By default, XLOOKUP will start matching from the first data value.

It is a more robust and flexible successor to the MATCH function.

XLOOKUP example - simple multiple criteria

XMATCH supports approximate and exact matching, reverse search, and wildcards (* ?)

The output from FILTER is dynamic.

If source data or criteria change, FILTER will return a new set of results.

XLOOKUP - complex criteria example

you might use INDEX to retrieve individual values, or entire rows and columns.

MATCH supports approximate and exact matching, andwildcards(* ?)

LOOKUP’s default behavior makes it useful for solving certain problems in Excel.

Excel formula: Maximum change

HLOOKUP Function

The Excel HLOOKUP function finds and retrieve a value from data in a horizontal table.

HLOOKUP supports approximate and exact matching, and…

Excel formula: XLOOKUP date of max value

Excel formula: Due date by category

Excel formula: XLOOKUP with multiple criteria

Excel formula: XLOOKUP basic exact match

Excel formula: Get first match cell contains

Excel formula: Name of nth largest value with criteria

Excel formula: Get employee information with VLOOKUP

Excel formula: XLOOKUP approximate match with multiple criteria

Excel formula: Get value of last non-empty cell

Excel formula: XLOOKUP last match

Excel formula: Detailed LET function example

Excel formula: Categorize text with keywords

Excel formula: Case sensitive lookup

Excel formula: Lookup first negative value

Article image

Article image

Article image

Article image

Excel XMATCH function

Excel FILTER function

Excel VLOOKUP function

Excel INDEX function

Excel MATCH function

Excel LOOKUP function

Excel HLOOKUP function

XLOOKUP - basic exact match example

XLOOKUP - multiple value example

XLOOKUP - regex match example

XLOOKUP example - simple multiple criteria