Excel XMATCH function🔎 Modern position search
The XMATCH function: Modern position search. Can also search from the bottom. This page shows the syntax, a worked example with its result and how the formula reads.
What does XMATCH do?
Modern position search. Can also search from the bottom
XMATCH syntax
=XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])
Arguments in square brackets [ ] are optional · argument names follow Microsoft's documentation
XMATCH example with the result
=********
👑 Ready-to-use example formula for VIP supporters only · Become VIP
Formula in cell F2 Yellow cells = result
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Code | Item | Code | Position | ||
| 2 | P1 | Coffee | P2 | 2 | ||
| 3 | P2 | Thai tea | ||||
| 4 | P3 | Snack |
How it reads: Like MATCH but exact match by default, no 0 needed
Frequently asked questions about XMATCH
What does XMATCH do?
Modern position search. Can also search from the bottom
What does the XMATCH example return?
The example formula in cell F2 gives 2.
Which Excel versions have XMATCH?
Excel for Microsoft 365 and Excel 2021 or later, according to Microsoft's function list. Older versions show #NAME?.
🕸️ More lookup formulas and related ones
Source: support.microsoft.com
Checked 17 November 2026 · by Black Sheep Barn · example results are calculated by the app's example engine, for learning