XLOOKUP
The XLOOKUP
function in Google Sheets returns the values in the result range based on the position where a match was found in the lookup range. If no match is found, it returns the closest match. With its versatile capabilities, the XLOOKUP
function is a valuable tool for various lookup scenarios.
Function Syntax and Parameters
Syntax: XLOOKUP(search_key, lookup_range, result_range, missing_value, [match_mode], [search_mode])
Parameters:
search_key
: The value or cell reference to search for.lookup_range
: The range of cells to search for thesearch_key
.result_range
: The range of cells from which to retrieve the results.missing_value
: The value to return if no match is found.[match_mode]
: [Optional] The match mode to use. Default is1
.[search_mode]
: [Optional] The search mode to use. Default is1
.
Use Cases and Scenarios
The XLOOKUP
function can be used in various scenarios, including:
- Data Lookup: Retrieve specific data based on a search key.
- Index-Match Replacement: Replace complex INDEX-MATCH formulas with a simpler solution.
- Approximate Matching: Find the closest match to the search key in a range.
- Dynamic Data Extraction: Extract relevant information based on changing criteria.