Return the Correct Price in Excel with XLOOKUP or VLOOKUP
Question details
Find the correct price for a part name without requiring the price list to be sorted.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet looks up part names in a price list whose names are not sorted in ascending order.
- Observed behavior
- LOOKUP can return an incorrect price because it relies on ascending order for reliable approximate matches.
Confirm where the part name and price columns are located and whether your price list is an Excel table named Prices. If using the VLOOKUP formula below, Part Name must be the first column in the selected range and Price must be the second.
Use XLOOKUP to find an exact part name
Use this method when XLOOKUP is available and you want a custom message for missing parts.
Select the cell where you want the price and enter =XLOOKUP(A2,Prices[Part Name],Prices[Price],"Not found"). Replace A2 or the table and column names if your worksheet uses different references.
Press Enter, then drag the cell's fill handle down to look up prices for the remaining part names.
Compare the part name in A2 with the entries in Prices[Part Name]. Check for leading or trailing spaces, spelling differences, and duplicate names.

Use exact-match VLOOKUP when XLOOKUP is unavailable
Use VLOOKUP with FALSE to find a part name in an unsorted price list.
Look up exact part prices in WPS Spreadsheet
Use an exact-match VLOOKUP formula in WPS Spreadsheet to find prices without sorting the part names.
- 1. Open your workbook: Open WPS Spreadsheet and select File > Open to choose your workbook.
- 2. Identify the price range: Locate the part name and price columns. For example, use A2 as the part to find and columns D and E as the part and price list.
- 3. Enter the formula: Select the result cell and enter =VLOOKUP(A2,$D$2:$E$100,2,FALSE). Adjust the range to include your price list, with part names in its first column.
- 4. Fill and check: Press Enter, then drag the fill handle down. Check spelling and spaces if a part returns #N/A.

Frequently Asked Questions
Why does LOOKUP return the wrong price?
LOOKUP expects its lookup values to be sorted in ascending order for reliable approximate matching. Use XLOOKUP or VLOOKUP with FALSE to match an unsorted part list exactly.
Do I need to sort the part names for exact-match VLOOKUP?
No. Set the fourth argument to FALSE, as in =VLOOKUP(A2,$D$2:$E$100,2,FALSE), to find an exact match without sorting.
What does #N/A mean in my VLOOKUP result?
It usually means the formula did not find an exact match. Check the lookup value and the first column of the selected range for spelling differences and extra spaces.
What happens if the price list contains duplicate part names?
XLOOKUP and exact-match VLOOKUP return the first matching entry by default. Review duplicate rows if the same part name has different prices.
Can VLOOKUP return a price from a column to the left of the part name?
No. VLOOKUP searches the first column of its selected range and returns a value to its right. Move the columns or use XLOOKUP with separate lookup and return ranges.




