Exercises / Lookups · 8 of 10
Find the latest price
XLOOKUP's sixth argument, search_mode, sets the direction: 1 searches from the top, -1 from the bottom. In a log sorted by date, searching from the bottom finds the most recent entry.
Your taskThe price log is in date order. In G2, use XLOOKUP to return the most recent price for the product in G1.
Pro
Unlock this exercise and every module after the basics.
Pro opens every exercise in every module, your review schedule, and the final test for the course certificate.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Date | Product | Price | Product | Coffee beans | ||
| 2 | 9 Dec 2025 | Coffee beans | $12.40 | Latest price | |||
| 3 | 18 Dec 2025 | Oat milk | $2.60 | ||||
| 4 | 26 Dec 2025 | Coffee beans | $12.90 | ||||
| 5 | 9 Jan 2026 | Sugar | $1.80 | ||||
| 6 | 23 Jan 2026 | Oat milk | $2.75 | ||||
| 7 | 30 Jan 2026 | Coffee beans | $13.60 | ||||
| 8 | 13 Feb 2026 | Sugar | $1.85 | ||||
| 9 | 27 Feb 2026 | Coffee beans | $14.10 | ||||
| 10 | 13 Mar 2026 | Oat milk | $2.90 | ||||
| 11 | 20 Mar 2026 | Sugar | $1.95 | ||||
| 12 | 3 Apr 2026 | Oat milk | $2.95 |