Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to find max or min value based on unique values in Excel?

Author Sun Last modified

For example, you have two columns of data: one with names (including duplicates) and the other with scores. Now, you want to find the maximum score for each unique name, as shown in the screenshot below. How can you quickly accomplish this task in Excel? This article provides the solution.

A screenshot showing two columns of data with names and scores, highlighting the max score for each unique name

Find max or min value based on unique values by creating a PivotTable

Find max or min value based on unique values with Kutools for Excel good idea3


arrow blue right bubble Find max or min value based on unique values by creating a PivotTable

In Excel, PivotTable is a powerful function, you can create a pivot table based on the range, and then find the max or min value by unique values.

1. Select the data you want to find max or min value from, and click Insert > PivotTable > PivotTable. See screenshot:

A screenshot showing the PivotTable creation option in Excel

2. Then check New Worksheet or Existing Worksheet in Create PivotTable dialog as you need, here I check New Worksheet. See screenshot:

A screenshot showing the Create PivotTable dialog with the New Worksheet option selected

3. Click OK. Now a PivotTable Field List pane appears in a new sheet, and check Name (the column you want to select max or min values based on) and right click to Add to Row Labels, and check Score (the column you want to return to max or min value) and right click to Add to Values. See screenshots:

A screenshot showing the PivotTable Field List with Name in Row Labels   A screenshot showing the PivotTable Field List with Score in Values

4. Then you can see a pivot table created in the worksheet, and now right click at the Sum of Score and select Value Field Settings from context menu, then in the popping dialog, under Summarize Values By tab, select Max or Min as you need. See screenshots:

A screenshot showing the Value Field Settings option on the context menuA screenshot showing the Value Field Settings dialog

5. Click OK. Now the maximum values for each unique value have been found.

A screenshot showing the PivotTable with max values based on unique names


arrow blue right bubble Find max or min value based on unique values with Kutools for Excel

With Kutools for Excel, you can use the Advanced Combine Rows utility to quickly find the max or min value based on unique values.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the data that you want to find max or min value (if you want to keep the original data, you can copy and paste them to another location first), and then click Kutools > Merge & Split > Advanced Combine Rows. See screenshot:

A screenshot of the Advanced Combine Rows option in Kutools tab in Excel

2. Then in the Advanced Combine Rows dialog, do as below:

1) Select the column that you want to get the unique value, then click Primary Key to set it as primary key column. See screenshot:

A screenshot of the Advanced Combine Rows dialog with the selection of the primary key column

2) Then select the column which you want to return the max or min value from, and click Calculate > Max or Min to find the max or min value. See screenshot:

A screenshot showing the Advanced Combine Rows dialog with Max or Min calculation options selected

3. Now click Ok, and you can see the max or min values of each unique value are found out. See screenshot:

A screenshot showing the original dataArrowA screenshot showing the result after using Advanced Combine Rows for max or min values

Tip: The "Use formatted values" option will keep your value formatting after combining.

Click here to know more about Advanced Combine Rows.

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now

Best Office Productivity Tools

šŸ¤– Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in