Quick answer
The core pattern is =XLOOKUP(lookup_value, lookup_array, return_array, "Not found"). The lookup and return ranges should align and represent the same records.
Understand the three required parts
Choose the value to find, the single row or column containing possible matches, and the row or column containing the result.
Handle missing values deliberately
Use the optional not-found argument instead of hiding every error with a broad IFERROR. A missing product code may represent a data-quality problem.
Avoid common range mistakes
Do not mix a full column lookup with a shorter return range. Prefer Tables and consistent data types; the text “1001” does not always match numeric 1001.
Common questions
Is XLOOKUP available in every Excel version?
Availability depends on the Excel version. Check Microsoft’s current documentation for your installation.
Can XLOOKUP return multiple columns?
In supported dynamic-array versions, the return array can span multiple adjacent columns.
Sources and editorial approach
This article was written as an independent study aid and checked against the official references below. We review time-sensitive facts when the article is updated. Read our editorial policy.