Ravindra BagaleCourses & study guides

4. Lookup Functions

4.8 XMATCH

Microsoft 365 / Excel 2021+. =XMATCH(lookup_value, lookup_array, [match_mode], [search_mode]) – like MATCH, but exact match by default and with the same modes as XLOOKUP.

Formula Result
=XMATCH("Oct", CityMonth!$B$1:$E$1) 3
=XMATCH("Nagpur", CityMonth!$A$2:$A$5) 3
=INDEX(CityMonth!$B$2:$E$5, XMATCH(H1,CityMonth!$A$2:$A$5), XMATCH(H2,CityMonth!$B$1:$E$1)) Two-way lookup
=XMATCH(MAX(G2:G11), G2:G11) Row position of the biggest order

Ravindra Bagale's Tip

When moving from MATCH to XMATCH, many students write 0 at the end out of old habit – in XMATCH, 0 already means exact, so it works. But if you forget the 0 in MATCH, it becomes approximate; in XMATCH it doesn't. If your office has mixed Excel versions, use MATCH(…,0) – it works everywhere.

Practice task

Use XMATCH to find the position of "Kolhapur" and "Nov" in the CityMonth table, then combine with INDEX.