where names (B5:B15) is a named range. Setting search mode to -1 species a “last to first” search. In this mode, XMATCH will match the lookup value against the lookup array, starting with the last value, and moving toward the first:

Retrieve date and amount

XMATCH returns a position. Typically, XMATCH is used with the INDEX function to return a value at that position. In the example show, we can use INDEX and XMATCH together to retrieve the date and sales for each name as follows: where dates (C5:C15) and sales (D5:D15) are named ranges. As before, search mode is set to -1 to force a reverse search. For more information about using INDEX with MATCH, see How to use INDEX and MATCH.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.