How to Return the Highest-Priced Item for a Specific Vendor in Excel
Question details
The user needs to retrieve the name of the highest-priced item associated with a specified vendor from a price tracking or order dataset.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Extracting a specific text record from a spreadsheet based on multiple criteria, specifically matching a vendor name and evaluating the maximum price.
- Observed behavior
- The user is looking for a formulaic approach to identify the max price for a vendor and return the corresponding item name without knowing the exact workbook layout beforehand.
Identify the column letters for your Vendor, Item, and Price data, and ensure your dataset does not contain merged cells that could interfere with array formulas.
Use XLOOKUP and MAXIFS Formulas
Combine the XLOOKUP and MAXIFS functions to evaluate multiple criteria and return the exact item name in a single cell.
This method uses MAXIFS to calculate the highest price for the specified vendor, and then applies boolean logic inside an XLOOKUP function to search for a row that matches both the target vendor and that calculated maximum price.
Determine the columns containing your data. For this example, assume Vendor is in Column A, Item is in Column B, Price is in Column C, and the specific vendor you want to search for is typed into cell E2.
Select the cell where you want the result to appear and enter the formula: =XLOOKUP(1,($A$2:$A$1000=E2)*($C$2:$C$1000=MAXIFS($C$2:$C$1000,$A$2:$A$1000,E2)),$B$2:$B$1000)
Press the Enter key. The formula will calculate the maximum price for the vendor in E2 and look up the corresponding item name from Column B.

Create a Helper Column
If advanced array formulas are too complex or slowing down your spreadsheet, you can use a helper column to simplify the lookup process.
Easily Analyze Vendor Data with WPS Spreadsheet
WPS Spreadsheet fully supports advanced modern functions like XLOOKUP, MAXIFS, and dynamic arrays, allowing you to extract maximum values and lookup corresponding items seamlessly and accurately.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your .xlsx or .csv dataset containing the vendor and price information.
- 2. Select the output cell: Click on the blank cell where you want the highest-priced item name to be displayed.
- 3. Apply the formula: Type or paste the XLOOKUP and MAXIFS formula into the formula bar and press Enter to instantly get your result.

Frequently Asked Questions
What if there are multiple items tied for the highest price for the same vendor?
The XLOOKUP formula provided will return the first item it encounters from the top of the list that matches the maximum price for that vendor. If you need to see all items that share the highest price, you should use the FILTER function instead.
Why does my XLOOKUP formula return a #NAME? error?
The #NAME? error typically occurs if your version of spreadsheet software does not support the XLOOKUP function. XLOOKUP is available in Microsoft 365, Excel 2021, and modern versions of WPS Office. If you are on an older version, you will need to use a combination of INDEX and MATCH.
Can I use full column references like A:A in the XLOOKUP array formula?
While you can use full column references like A:A in standard functions like MAXIFS, using them inside array operations (like $A:$A=E2) forces the program to calculate over a million rows. This can significantly slow down your computer's performance. It is always recommended to restrict the ranges to your actual data bounds, such as $A$2:$A$1000.




