The modern, flexible lookup — searches any direction with a clean result.
Copy this formula
=XLOOKUP(A2, Products, Prices)XLOOKUP takes the lookup value, the lookup array, and the return array. It defaults to exact match, can look left or right, and accepts an if-not-found argument so you avoid wrapping it in IFERROR.
=XLOOKUP(A2, Products, Prices, "Not found")→$19.90Returns the price, or a message if missing.
VLOOKUP (older Excel)
=VLOOKUP(A2, A:C, 3, FALSE)Use when XLOOKUP isn't available.
Excel 365 and Excel 2021. For 2019 and earlier, use VLOOKUP or INDEX/MATCH.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.