XLOOKUP
Search one range and return the corresponding item from another, with optional fallback text.
Syntax
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])Worked example
Find product P4 in the first array and take its corresponding price from the second.
=XLOOKUP("P4",{"P2","P4","P9"},{18,35,27},"Missing")Result 35
Microsoft documentation
Check the arguments, supported editions and behavior of this function in Microsoft’s reference.
Microsoft referenceHow to Use XLOOKUP in Excel (5 Practical Examples)
Practice XLOOKUP
Look up the price of product P4. Return “Missing” when a code has no match.
| A | B | |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 |
Show example formula
=XLOOKUP("P4",A2:A4,B2:B4,"Missing") Lesson quiz
Answer three questions to see your level in this lesson.
