You receive an order file with only Product Codes. Your manager needs Product Name, Category, Supplier and Unit Price added to every order. Instead of manually searching the master file, XLOOKUP can fetch all details automatically.
What does XLOOKUP do?
XLOOKUP searches for a value in one column and returns related information from another column. It is useful for product lookup, employee lookup, customer lookup, price lookup and master-data matching.
XLOOKUP formula structure
Basic syntax
Example: =XLOOKUP(B4,'Product Master'!A:A,'Product Master'!B:B,"Not Found")
This looks for the product code in B4, searches the Product Code column, and returns the matching Product Name.
Business examples
| Need | Formula | Result |
|---|---|---|
| Find product name | =XLOOKUP(B4,Master!A:A,Master!B:B,"Not Found") | Laptop Stand |
| Find unit price | =XLOOKUP(B4,Master!A:A,Master!E:E,0) | ₹450 |
| Wrong product code | =XLOOKUP(B4,Master!A:A,Master!B:B,"Not Found") | Not Found |
Why XLOOKUP is powerful
Enrich orders using product master data
Download one ZIP file containing the practice workbook, challenge workbook, solution workbook, formula cheat sheet, quiz and answer key.
Mini assignment
- Use XLOOKUP to fetch Product Name from Product Code.
- Use XLOOKUP to fetch Category and Supplier.
- Use XLOOKUP to fetch Unit Price.
- Calculate Total Sales.
- Handle invalid product codes using “Not Found”.
Quick quiz
- What is XLOOKUP used for?
- What are the three required parts?
- What does if_not_found do?
- Can XLOOKUP return values from the left?
Answers: Lookup and return related data; lookup value, lookup array, return array; shows a custom result when no match is found; yes.