where months (C4:E4) and names (B5:B13), and data (C5:E13) are named ranges. Note: XLOOKUP performs an exact match by default, so match mode is not set. Working from the inside out, the inner XLOOKUP is used to retrieve all data for “Frantz”: XLOOKUP finds “Frantz” in the named range names (B5:B13). Frantz appears in the fifth row, so XLOOKUP returns the fifth row of data (C5:E13). The result is an array representing a single row of data for Frantz, containing 3 months of sales: This array is returned directly to the outer XLOOKUP as the return_array: The outer XLOOKUP finds the value in H5 (“Mar”) inside the named range months (C4:E4). The value “Mar” appears as the third item, so XLOOKUP returns the third item from the sales data, the value 10525.

Without named ranges

The named ranges used in this example are for readability only. Without named ranges, the formula is:

INDEX and MATCH

This example can be solved with INDEX and MATCH like this: INDEX and MATCH is a good solution to this problem, and probably easier to understand for most people. However, the XLOOKUP version shows off the power and flexibility of XLOOKUP.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.