How to Find the Highest Price for a Part Number in Excel
Question details
Find the highest cost or price associated with a specified part number.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains repeated part numbers with different costs or prices, and the user wants the maximum value for a selected part.
- Observed behavior
- The result should show the highest cost or price from rows matching the requested part number.
Check which columns contain part numbers, costs, and prices, and identify the cell containing the part number to look up. The examples use A3:A14 for part numbers, B3:B14 for costs, C3:C14 for prices, and E4 for the lookup value.
Use MAXIFS to Find the Highest Cost or Price
Use MAXIFS when your Excel version supports it to calculate the maximum value for a matching part number.
Type the part number you want to find in cell E4.
Select F4, enter =MAXIFS($B$3:$B$14,$A$3:$A$14,E4), and press Enter.
If prices are in C3:C14, select G4, enter =MAXIFS($C$3:$C$14,$A$3:$A$14,E4), and press Enter.

Use a MAX and IF Array Formula in Older Excel Versions
Use this formula if your version of Excel does not support MAXIFS.
Find the Highest Part Cost in WPS Spreadsheets
Open your worksheet in WPS Spreadsheets and use MAXIFS to return the highest cost for a selected part number.
- 1. Open the worksheet: Open WPS Spreadsheets and use Open to select your Excel workbook.
- 2. Enter the lookup value: Type the part number in E4, or choose the cell that contains your lookup value.
- 3. Enter the formula: Select F4, enter =MAXIFS($B$3:$B$14,$A$3:$A$14,E4), and press Enter. Adjust the ranges to match your worksheet.
- 4. Save the workbook: Choose Menu > Save or Save As to keep the result in your workbook.

Frequently Asked Questions
How do I find the highest price instead of the highest cost?
Replace the cost range in MAXIFS with the price range. For prices in C3:C14, use =MAXIFS($C$3:$C$14,$A$3:$A$14,E4).
What can I use if Excel does not recognize MAXIFS?
Enter =MAX(IF($A$3:$A$14=E4,$B$3:$B$14)) in the result cell and confirm it with Ctrl+Shift+Enter in older Excel versions.
Why does MAXIFS return zero for my part number?
There may be no matching part number, or the highest matching value may be zero. Enter =COUNTIF($A$3:$A$14,E4) to check whether the part number occurs in the list.
Can I copy the formula down for other part numbers?
Yes. Enter additional part numbers below E4, then drag the fill handle from F4 down. The fixed data ranges stay the same while the E4 reference changes for each row.




