Explanation
By default, XLOOKUP will return the first match in a data set.
However, XLOOKUP offers an optional argument called search_mode to control the order in which data is searched.
you’re free to see this option used in the example shown.
When an exact match is found, the corresponding price in column D is returned.
If no match is found, XLOOKUP will return #N/A.
Note: this example depends on data being sorted by date in ascending order.
If data is unsorted,see this example.
XLOOKUP supports approximate and exact matching, wildcards (* ?)
for partial matches, and lookups in vertical or horizontal ranges….