Lookup & reference
XMATCH
Position, with modern lookup modes.
Syntax
XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])Example: =XMATCH(A2,B2:B100)
Available in: Excel 2021+, Microsoft 365
Try it
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in F2: =XMATCH(103,A2:A6)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ID | Item | Price | Stock | Result | |
| 2 | 101 | Pen | 2.5 | 120 | 3 | |
| 3 | 102 | Notebook | 4 | 80 | ||
| 4 | 103 | Lamp | 25 | 15 | ||
| 5 | 104 | Mug | 7.5 | 40 | ||
| 6 | 105 | Backpack | 39 | 12 |
Result in F2: 3