What it does
XMATCH is a modern version of MATCH with clearer options for exact matching and search direction.
Syntax or pattern
=XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])5 practical examples
Find exact position
Return the position of a product in a list.
=XMATCH(A2, Products[Product])XMATCH defaults to exact match in many common cases.
Search from bottom to top
Find the last occurrence of a value.
=XMATCH(A2, Products[Product], 0, -1)Search mode -1 scans from the end.
Find a column by header
Locate a month header in a table.
=XMATCH(H1, Sales[#Headers])Useful for dynamic column selection.
Use XMATCH with INDEX
Return a price using XMATCH as the position finder.
=INDEX(Products[Price], XMATCH(A2, Products[Product]))A modern alternative to INDEX MATCH.
Find next larger value
Match a value to the next larger threshold.
=XMATCH(B2, Thresholds, 1)Helpful for bands, levels and tiers.
Common mistakes to avoid
- Mixing up match_mode and search_mode.
- Using approximate modes without understanding thresholds.
- Assuming duplicates are handled automatically.
Related Excel examples
FAQ
Why use XMATCH?
It has clearer defaults and supports reverse searches more directly than MATCH.
Here are some ideas for you
Optional resources that may help if you are learning formulas, building reports, or working in spreadsheets often.
- Excel formula booksSee ideas
Practice formulas with structured examples you can keep beside your desk.
- Excel shortcut guidesSee ideas
Build speed with keyboard shortcuts for selection, formatting and navigation.
- Numeric keypadsSee ideas
Helpful if you enter many numbers on a laptop or compact keyboard.
- External monitorsSee ideas
Useful for viewing large worksheets, formulas and reference tables side by side.
- Desk notebooksSee ideas
Sketch formula logic, report ideas and table structures before building.
- Laptop standsSee ideas
Make long spreadsheet sessions more comfortable and ergonomic.
Some links in this section may be affiliate links. Choose only what is useful for your own work.