The XLOOKUP function is lookup function in Excel that was introduced in the Office 365 subscription in 2019. Here are the steps to use XLOOKUP in Excel:
- Open Microsoft Excel and create a new worksheet.
- In a cell, type in the XLOOKUP formula in the following format:
=XLOOKUP(lookup_value, lookup_array, return_array, [match_mode], [search_mode])
- Replace the “lookup_value” argument with the cell reference or value that you want to lookup.
- Replace the “lookup_array” argument with the range of cells that contain the data you want to search.
- Replace the “return_array” argument with the range of cells that contain the values you want to return.
- Optional: use the “match_mode” argument to specify the type of match you want. The available options are exact match (0 or omitted), exact match or next smallest (1), exact match or next largest (2), and wildcard match (use “*” or “?” in the lookup_value argument).
- Optional: use the “search_mode” argument to specify the direction of the search. The available options are search from top to bottom (1 or omitted) or search from bottom to top (-1).
For example, if you want to lookup the price of a product based on its name, you could use the following XLOOKUP formula: =XLOOKUP("Product A", A2:A10, B2:B10)
This would search for “Product A” in the range A2:A10 and return the corresponding price from the range B2:B10.