Function Problems

How to Find the Highest Price for a Part Number in Excel

John WilsonJohn Wilson Dec 2, 2026 868 views

Question details

Find the highest cost or price associated with a specified part number.

How to Find the Highest Price or Cost for a Part Number in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Enter the part number

Type the part number you want to find in cell E4.

2
Calculate the highest cost

Select F4, enter =MAXIFS($B$3:$B$14,$A$3:$A$14,E4), and press Enter.

3
Calculate the highest price

If prices are in C3:C14, select G4, enter =MAXIFS($C$3:$C$14,$A$3:$A$14,E4), and press Enter.

Use MAXIFS to Find the Highest Cost or Price
Check for missing part numbers: MAXIFS returns 0 when no rows match. To distinguish a missing part number from a genuine zero value, check =COUNTIF($A$3:$A$14,E4).
Work with spreadsheets in WPS Office

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. 1. Open the worksheet: Open WPS Spreadsheets and use Open to select your Excel workbook.
  2. 2. Enter the lookup value: Type the part number in E4, or choose the cell that contains your lookup value.
  3. 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. 4. Save the workbook: Choose Menu > Save or Save As to keep the result in your workbook.
Find the maximum cost or price for a matching part numberOpen and edit Microsoft Excel XLS and XLSX filesWork with formulas in a familiar spreadsheet interface
microsoft office alternative - wps office

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.