Lookup and referenceExcel 2021

XMATCH

Locate an item’s position with selectable match behavior and search direction.

Syntax

=XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])

Worked example

Search backward to find the last exact occurrence of Blue.

=XMATCH("Blue",{"Blue","Red","Blue"},0,-1)

Result 3

Microsoft documentation

Check the arguments, supported editions and behavior of this function in Microsoft’s reference.

Microsoft reference

Search ExcelTutor