The Problem
VLOOKUP is clunky. You have to count columns manually (...2, FALSE). XLOOKUP fixes everything by letting you simply select the two columns you care about.
The Easy Way: Use SheetXAI
If you don't want to mess with formulas, the fastest way to do this is simply by asking.
With SheetXAI, you can open the sidebar and type:
Find the price for the Product ID in A2.
SheetXAI will instantly write the formula or script for you and fill the cells. It handles the syntax so you can focus on the result.
The Manual Way: The Formulas You Need
To do this manually, you need to use: XLOOKUP.
1. XLOOKUP
Searches a range and returns an item from a corresponding range.
Syntax: =XLOOKUP(lookup_value, lookup_array, return_array)
- lookup_value: What you are looking for.
- lookup_array: The range to search.
- return_array: The range to return values from.
Example: Look for A2 in Col C, return from Col D.
Understanding the Logic
It works like a magnet. Find value X in list Y, and return the corresponding value from list Z.
The Final Formula:
=XLOOKUP(A2, C:C, D:D)
Conclusion
Now you know the "classic" way to solve this using formulas. It's a great skill to have.
But for those times when you just want the job done without the mental math, SheetXAI is there to help.