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 referenceExcel XMATCH Function - The Ultimate Guide
Practice XMATCH
Search backward to find the last exact occurrence of Blue.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 |
Show example formula
=XMATCH(B2,B3:D3,B4,B5) Lesson quiz
Answer three questions to see your level in this lesson.
