EXCEL SOLUTIONS

XLOOKUP function in Excel

A modern lookup: finds a value in one column and returns the matching value from another column, to the left or right.

IntermediateLookup

Syntax

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found])
Arguments of XLOOKUP
ArgumentWhat it means
lookup_valueWhat to find.
lookup_arrayThe column or row to search.
return_arrayThe column or row to return a value from.
if_not_foundOptional. What to show when there is no match.

Examples with results

Every result below is calculated by the practice engine on the sample data shown, not typed in by hand.

Price list (fictional)

RowABC
1CodeProductPrice
2P-101Desk lamp24.9
3P-102Notebook3.5
4P-103Mouse15
5P-104Keyboard32
6P-105Monitor stand21
Price list (fictional) Row 1 holds the headings. All data is fictional. Dates are year-month-day.

Download CSV

  • =XLOOKUP("P-104",A2:A6,C2:C6)32

    Price for P-104

  • =XLOOKUP("Mouse",B2:B6,A2:A6)P-103

    Look up a code by product name (looking left)

  • =XLOOKUP("P-999",A2:A6,C2:C6,"Not listed")Not listed

    A friendly result when nothing matches

Try it yourself

Change the formula or switch to other sample data.

Press Calculate to see the result.

The practice box runs in your browser with BDK’s own calculator, which covers about 60 common functions. Cell references work as in Excel (B2, B2:B9). Your formulas are not saved or sent anywhere. For anything unusual, check the result in Excel itself.

How people use XLOOKUP at work

  • Operations

    Find the unit cost for a SKU.

    =XLOOKUP("A-120",A2:A6,E2:E6)22
    Data: Stock levels (fictional)
  • HR

    Find a person’s department.

    =XLOOKUP("Dina Ali",A2:A8,B2:B8)HR
    Data: Team list (fictional)

Common mistakes and tips

  • XLOOKUP is not in Excel 2019 or older. Use INDEX with MATCH there.
  • The two ranges must be the same size.

Works in

Microsoft 365, Excel 2021 or later, and Google Sheets. Not in Excel 2019 or older.

Related formulas

VLOOKUPINDEXMATCH

Lessons that use it

Need Something Different? Let’s Talk.

Looking for different features or something built around your workflow? Share your idea with us.