Excel Function

XLOOKUP

Modern lookup function with flexible matching.

XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found])

Arguments

lookup_value

Required

Enter the value you want to look up.

lookup_array

Required

Specify the row/column range where the lookup key is searched.

return_array

Required

Specify the range to return when a match is found.

if_not_found

Optional

Specify the value returned when no match is found.

Practice Preview

Use XLOOKUP to return the result with these settings (Lookup value: B2 (cell B2 (Product Name in column B)), Lookup array: B2:B8 (Product Name in column B), Return array: D2:D8 (Stock in column D), If not found: "N/A"). You can set ranges by dragging from the start cell to the end cell in the same argument field.

Example Table

#
AProduct ID
BProduct Name
CPrice
DStock
2P001Apple12080
3P002Banana98120
4P003Notebook45035
5P004Pen30060
6P005Grapes15045
7P006Ruler25020
8P007Peach8655

How to Use (Formula)

=XLOOKUP(B2, B2:B8, D2:D8, "N/A")

Result

80

Practice This Function

XLOOKUP FAQ

How do I use XLOOKUP in Excel?

Enter the lookup value, lookup range, and return range in order. For example, to return stock from a product ID, use XLOOKUP(B2, B2:B8, D2:D8, "N/A").

Where can I practice XLOOKUP?

Use the "Start Function Practice" button to jump straight into XLOOKUP drills.

What arguments does XLOOKUP use?

The main arguments are Lookup value, Lookup array, Return array, If not found. Start with the required ones, then add optional arguments if needed.