XLOOKUP
Finds a value in one list, and returns the matching value from another.
How it’s written
XLOOKUP(find, where_to_look, what_to_return, if_not_found)Example
| A | B | C | |
|---|---|---|---|
| 1 | Code | Product | Price |
| 2 | P-10 | Lamp | 45 |
| 3 | P-20 | Desk | 210 |
| 4 | P-30 | Chair | 120 |
=XLOOKUP("P-20",A2:A4,C2:C4)Result: 210
Finds P-20 and returns its price.
Try it yourself
Open a live sheet with this example, and type the formula yourself. It takes a moment to load.
Worth knowing
The fourth part replaces #N/A with your own message.
Practice it properly
Find it with XLOOKUP gives you real tasks, with your formulas tested on data you haven’t seen.