Find the latest match with XLOOKUP

Premium

The price list grows at the bottom each time a price changes. In F2, find the current price of the product in F1, the last match in the list. Search from the bottom with search_mode -1, the sixth argument: XLOOKUP(F1,B2:B8,C2:C8,,0,-1).

F2
ABCDEFG
1Effective from Product Price Product Coffee
2Jan 1, 2024 Coffee 89 Current price
3Jan 1, 2024 Tea 45
4Mar 1, 2024 Coffee 95
5Apr 1, 2024 Cocoa 60
6May 1, 2024 Tea 49
7Jul 1, 2024 Coffee 99
8Sep 1, 2024 Tea 52
9

Premium lesson

Unlock XLOOKUP and every other lesson

This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.

Next with premium:IFERRORFILTER

It comes up in this mock test: Excel test for data analysts

Need help?