XLOOKUP

searches range and returns matching item

signature

XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

returns: any

argumentrequired
lookup_value required
lookup_array required
return_array required
if_not_found optional
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.

ABC
1 10alpha
2 20beta
3 30gamma
4 40delta
5 50epsilon
fx =XLOOKUP("beta", C1:C5, A1:A5) 20

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
  • INDEX returns value at row and column in range
  • INDIRECT returns reference specified by text string
  • LOOKUP looks up value in one-row or one-column range