XLOOKUP function in MS Excel is like an upgraded form of the previous LOOKUP, VLOOKUP, and HLOOKUP functions. It is also used to find specific values from a range of cells in a worksheet in MS Excel.
The purpose of the XLOOKUP function is that it can be used to find out both exact and approximate matches in cells. It can look up specific data in both horizontal and vertical ranges. Wildcard entries like * and ? can also be found using this function.
The syntax of this function is given below.
=XLOOKUP(lookup, lookup_array, return_array, [not_found], [match_mode], [search_mode])
For example, if you want to retrieve the total sales of different movies, the formula will be written as follows. B5-B9 is the cell address of movies, while E5-E9 is the cell address of total sales.
=XLOOKUP (H4, B5:B9, E5:E9)