The XLOOKUP function returns the values in the result range based on the position where a match was found in the lookup range.