Explanation

The XMATCH function offers new features not available with the MATCH function.

The default value for search mode is 1, which specifies a normal “first to last” search.

Setting search mode to -1 species a “last to first” search.

Excel formula: Nearest location with XMATCH

Typically, XMATCH is used with the INDEX function to return a value at that position.

As before, search mode is set to -1 to force a reverse search.

For more information about using INDEX with MATCH, seeHow to use INDEX and MATCH.

Excel XMATCH function

It is a more robust and flexible successor to the MATCH function.

XMATCH supports approximate and exact matching, reverse search, and wildcards (* ?)

you’re able to use INDEX to retrieve individual values, or entire rows and columns.

Excel INDEX function

The MATCH function is often used together with INDEX to provide row and column numbers….