Syntax
| Parameter | Description |
|---|---|
| lookup_value | Parameter of the XMATCH function. |
| lookup_array | Parameter of the XMATCH function. |
| [match_mode] | (Optional.) Parameter of the XMATCH function. |
| [search_mode] | (Optional.) Parameter of the XMATCH function. |
Examples
Find position of a value
=XMATCH("Gadget", A2:A100)
Search from the bottom
=XMATCH("East", A2:A100, 0, -1)
Wildcard search
=XMATCH("Wid*", A2:A100, 2)
Common Errors
The value was not found in the range. Check spelling, extra spaces, or whether the value exists in the data.
The search range is not a single row or column. XMATCH requires a one-dimensional range.
Tips
Unlike MATCH, XMATCH defaults to exact match (match_mode 0). No more forgotten third argument causing approximate matches.
search_mode: 1 = first to last (default), -1 = last to first, 2 = binary ascending, -2 = binary descending.
=INDEX(C:C, XMATCH(val, A:A)) is the modern equivalent of INDEX-MATCH, with cleaner syntax and better defaults.
Try XMATCH in Viztab
Import your data and use XMATCH with 370+ other formulas. No signup required.
Open Viztab