Home › Functions › Lookup › XLOOKUP
Lookup function
XLOOKUP function in Google Sheets
XLOOKUP finds a value in one range and returns the item in the same position from another range. It does everything VLOOKUP does, and it can look left, has a built-in "not found" value, and can search from the bottom up.
Syntax
=XLOOKUP(search_key, lookup_range, result_range, [missing_value], [match_mode], [search_mode])
search_keyThe value to find. lookup_rangeA single row or column to search. result_rangeThe row or column to return from. Same size as lookup_range. missing_valueOptional. Returned instead of #N/A when nothing matches. match_modeOptional. 0 exact (default), -1 exact or next smaller, 1 exact or next larger, 2 wildcard. search_modeOptional. 1 first to last (default), -1 last to first.
Practice XLOOKUP
Find the name of the person whose badge number is in E2 . The name is to the left of the badge column, which VLOOKUP can't do. Answer in F2 .
Check answer
Hint
Show answer
↻ New data
Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.
This interactive exercise needs JavaScript enabled.
XLOOKUP examples
Each example below runs against this sample sheet. The results are calculated by the same engine as the practice grid.
Employee directory
Tips and common mistakes
Exact match is the default, so there's no FALSE to forget. Because you point at the result column directly, inserting columns never breaks the formula. To skip an optional argument, leave it empty between commas, as in the third example.
Related functions
Learning step by step? XLOOKUP is covered in Lesson 18: XLOOKUP Function of the free course.