Sample Data
This table lists products and their prices. We want to find the price of a product typed in D2 using XLOOKUP.
| Cell | Value |
|---|---|
| A1 | Product |
| B1 | Price |
| A2 | Apple |
| B2 | 1.2 |
| A3 | Banana |
| B3 | 0.5 |
| A4 | Cherry |
| B4 | 2 |
| D1 | Lookup Product |
| D2 | Banana |
| E1 | Price Found |
This table lists products and their prices. We want to find the price of a product typed in D2 using XLOOKUP.
| Cell | Value |
|---|---|
| A1 | Product |
| B1 | Price |
| A2 | Apple |
| B2 | 1.2 |
| A3 | Banana |
| B3 | 0.5 |
| A4 | Cherry |
| B4 | 2 |
| D1 | Lookup Product |
| D2 | Banana |
| E1 | Price Found |
=XLOOKUP(D2, A2:A4, B2:B4, "Not Found")A B C D E 1 |Product | Price | |Lookup |Price | | | |Product |Found 2 |Apple | 1.2 | |Banana | 3 |Banana | 0.5 | | | 4 |Cherry | 2.0 | | | Arrows: D2 --> A2:A4 (lookup array) D2 --> B2:B4 (return array)
A B C D E 1 |Product | Price | |Lookup |Price | | | |Product |Found 2 |Apple | 1.2 | |Banana | 0.5 3 |Banana | 0.5 | | | 4 |Cherry | 2.0 | | |