logo
excelfunctions.org
bookmarks

XLOOKUP

Searches a range or an array, and returns an item corresponding to the first match it finds. If a match doesn't exist, then XLOOKUP can return the closest (approximate) match.

Lookup & ReferenceBeginner EssentialsLookup & Matching EssentialsModern Excel Functions

What it does

Searches a range for a match and returns the corresponding value from another range.

Syntax

XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

Arguments

  • lookup_value(value) β€” The value to search for.
  • lookup_array(range) β€” The range or array to search.
  • return_array(range) β€” The range or array to return from.

Examples

Exact match lookup

Return Dept for an ID using an input cell.

FORMULA
=XLOOKUP(A2,B2:B5,C2:C5,"Not found")
RESULT
Sales
SAMPLE DATA
ABC
1Lookup IDIDDept
210021001Ops
31002Sales
41003HR
51004IT