Lookupmedium
XLOOKUP()
The modern replacement for VLOOKUP. Searches any column, returns from any column.
Syntax
fx
=XLOOKUP(search_key, lookup_range, result_range, [missing_value], [match_mode])
Arguments
Example
fx
=XLOOKUP("Acme Co", A:A, C:C, "Not found")
Paste this into Google Sheets to run it. The live playground on this site covers 24 of the 61 functions, and XLOOKUP isn't one of them yet.
Common pitfalls
- Defaults to exact match: no need to remember
FALSE. The 4th arg is the not-found return value, NOT a sort flag. - The 6th arg sets search direction; pass
-1to find the LAST match instead of the first. - Returns
#N/Aif not found and no default supplied. Pass an empty string or sentinel as the 4th argument.
Related formulas
Used by