ML with circles

Mearns Learns

XLOOKUP to the left

The XLOOKUP function searches an array or range, and returns the item(s) corresponding to the first match it finds. The return_array can be to the right or the left of the lookup_array.

Historically, this was impossible to do using VLOOKUP. The INDEX and MATCH functions needed to be used instead.

See the XLOOKUP function for more details on the function.

Syntax

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

To lookup to the left of the lookup_array, simply set the return_array range to the data you want to return.

Example

In the example, the XLOOKUP function looks up a Profit & Loss text description and returns an account number stored in a column to the left.

XLOOKUP example XLOOKUP example

A lookup to the left is very easy with the XLOOKUP function.