XMATCH

returns the position of an item in a range or array · from excel · excel: verified match · no sheets equivalent

signature

XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])

returns: number

argumentrequired
lookup_value required
lookup_array required
match_mode optional
search_mode optional

examples

formula and result, taken from the engine's own test suite — every result below is asserted in CI, not written by hand.

C
1 alpha
2 beta
3 gamma
4 delta
5 epsilon
fx =XMATCH("gamma", C1:C5) 3

errors

error values observed from the engine — each with a call that produces it.

errorproduced by
#N/A =XMATCH(42,A1:A2,3)

related

  • ADDRESS returns a cell address as text from row and column numbers
  • AREAS returns the number of areas in a reference
  • HLOOKUP searches first row and returns matching value
  • HYPERLINK the text a link displays — clickability is the renderer's
  • INDEX returns value at row and column in range
  • INDIRECT returns reference specified by text string