Excel Practice - XLOOKUP
Instruction
Look up code "P-102" in A2:A6 and return the matching price from C2:C6; show "Not found" if missing.
Formula Syntax
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
- lookup_value: The value to find.
- lookup_array: The range/array used for lookup.
- return_array: The range/array that returns the matched result.
- [if_not_found]: Optional fallback value when no match is found.
- [match_mode]: Optional match behavior for lookup.
- [search_mode]: Optional search direction/method.
What it does
Run flexible lookups across arrays with exact or approximate match modes.
lookup-reference-table.xlsx
| A | B | C | |
|---|---|---|---|
| 1 | Code | Name | Price |
| 2 | P-101 | Mouse | 19 |
| 3 | P-102 | Keyboard | 45 |
| 4 | P-103 | Monitor | 199 |
| 5 | P-104 | USB Hub | 29 |
| 6 | P-105 | Headset | 59 |
| 7 | Output |
Input Formula
Need Help?
Tips
- Use XLOOKUP with clean and consistent ranges for predictable results.
- Validate data types (number, text, date) before applying the formula.
- Test the formula with a small sample first, then scale it to larger ranges.