Dashboard Mode - XLOOKUP function
Goal
Find the price of a product by its name quickly and accurately.
Find the price of a product by its name quickly and accurately.
| Product | Price |
|---|---|
| Apple | 1.20 |
| Banana | 0.50 |
| Carrot | 0.30 |
| Date | 1.50 |
| Eggplant | 0.80 |
=XLOOKUP(B8, A2:A6, B2:B6, "Not found")+----------------------+------------------+ | Product List | | | +--------------+ | | | | Product |Price| | | | | Apple | 1.20| | | | | Banana | 0.50| | | | | Carrot | 0.30| | | | | Date | 1.50| | | | | Eggplant| 0.80| | | | +--------------+ | | +----------------------+------------------+ | Enter Product Name: B8 | | Price Found: B9 | +----------------------------------------+
User types a product name in cell B8. The XLOOKUP formula in B9 updates automatically to show the price of that product. If the product is not in the list, it shows "Not found". This lets the user quickly check prices without searching manually.
If you type "Date" in cell B8, what price appears in B9? (Answer: 1.50)
If you type "Orange" in B8, what appears? (Answer: Not found)
XLOOKUP function do in Google Sheets?XLOOKUP in Google Sheets?=XLOOKUP(search_key, lookup_range, return_range, [if_not_found], [match_mode], [search_mode]).=XLOOKUP(search_key, lookup_range, return_range, [if_not_found], [match_mode], [search_mode]) matches the correct order and optional arguments. Options A, B, and D have incorrect argument orders.=XLOOKUP(search_key, lookup_range, return_range, [if_not_found], [match_mode], [search_mode]) [OK]A2:A5 = {101, 102, 103, 104}B2:B5 = {"Apple", "Banana", "Cherry", "Date"}=XLOOKUP(103, A2:A5, B2:B5) return?=XLOOKUP(105, A2:A5, B2:B5)A2:A5 = {101, 102, 103, 104}B2:B5 = {"Apple", "Banana", "Cherry", "Date"}if_not_foundif_not_found argument, XLOOKUP returns an error when no match is found.Product IDs (A2:A6): {201, 202, 203, 204, 205}Prices (B2:B6): {10, 15, 20, 25, 30}if_not_found argument with the desired message.=XLOOKUP(206, A2:A6, B2:B6, "Not Found") correctly uses "Not Found" as the if_not_found argument. =XLOOKUP(206, A2:A6, B2:B6) will return an error. =XLOOKUP(206, B2:B6, A2:A6, "Not Found") swaps lookup and return ranges incorrectly. =XLOOKUP("Not Found", A2:A6, B2:B6, 206) uses wrong argument order.Pass the test and this pattern moves unknown