XLOOKUP Function in Excel
Learn how to use the XLOOKUP function in Excel, understand the syntax and common use cases, and let ExcelGPT adapt the formula to your real workbook structure.
XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])lookup_valueRequiredThe value you want to find.
lookup_arrayRequiredThe range or array to search.
return_arrayRequiredThe range or array to return a result from.
if_not_foundOptionalOptional text or value to return when there is no match.
match_modeOptionalOptional match behavior such as exact match or next smaller item.
search_modeOptionalOptional search order, including reverse search.
Examples
=XLOOKUP(A2, Sheet2!A:A, Sheet2!C:C, "Not found")Looks up the customer ID in column A on Sheet2 and returns the owner from column C.
=XLOOKUP(E2, A:A, D:D, "", 0, -1)Searches from bottom to top to return the latest status associated with the lookup value.
Common mistakes
Check the argument order, data types, and references used in XLOOKUP.
Review whether ranges, blank cells, error values, or dynamic results are affecting the formula.
Validate the formula on a few sample rows before scaling it across the workbook.
Related functions
Need a variant of this formula?
Describe your workbook structure and ExcelGPT can generate a version tailored to your real columns, ranges, and edge cases.