=XLOOKUP (lookup_value, table_array, col_index_num, [range_lookup], [search_mode], [if_not_found])
=XLOOKUP(H4,B5:B9,E5:E9)
The function performs a basic exact match to retrieve sales data on a movie. This example searches the range B5:B9 for the value in cell H4, and then returns the corresponding value from the range E5:E9.
=XLOOKUP(E5,B5:B9,C5:C9,,-1)
The function performs a basic approximate match by finding an exact or next smallest match. This example searches the range B5:B9 for the value in cell E5, and then returns the corresponding value from the range C5:C9, or the next smallest value if an exact match isn't found.
=XLOOKUP(B5,B8:B15,C8:E15)
The function can return more than one value at the same time. This example searches the range B8:B15 for the value in cell B5, and then returns the corresponding value from the ranges C8:E15. As multiple ranges are used, up to three values can be returned.
=XLOOKUP(I6,C4:F4,XLOOKUP(I5,B5:B9,C5:F9))
The function performs a two way lookup by nesting one XLOOKUP within another XLOOKUP. This example searches the range C4:F4 for the value in cell I6. The value that is returned is determined by a second lookup which searches the range B5:B9 for the value in cell I5, and then returns the corresponding value from the range C5:F9.
XLOOKUP is a Sourcetable function that enables users to quickly locate items within a table or range by searching by a designated column. If an exact match is not found, an approximate match is returned.