How to find max or min value in a group in Excel?
Generally, finding the max or min value in a range may be easy for most of Excel users, but how about finding the max or min value in each group? Here this tutorial is talking about the tricks to find the max or min value in a group in Excel.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
If the data entered in Excel is showed as below (the value is entered in ascending order), you can use a formula to find the last value in each group and then filter it.
1. Type this formula =IF(A2=A3,"","1") ( A2 and A3 are in a group) into the cell C2 which is adjacent to your data, and then press Enter key and drag Auto fill to copy the formula to the range you need. See screenshot:
2. Select C1:C12 and click Data > Filter to add Filter button into Cell C1. See screenshot:
3. Click the Filter button, and check 1 only in the list, and click OK. See screenshot:
Now you can see only the max value in each group is shown.
1. You can delete the filter column (Column C) if you do not need it any more.
2. This way only can find the max value.
3. The data mush be sorted in ascending order in each group.
There is another way that can quickly find the max or min value in each group by inserting a pivot table.
1. Select the data range, and then click Insert > Pivot Table > Pivot Table. See screenshot:
2. Check New Worksheet option, or check Existing Worksheet option and select a cell to place the pivot table, then click OK. See screenshot:
3. Go to the PivotTable Fields List pane at the right side, drag Products to Row Labels, and Sales to Values. See screenshot:
4. Then go to the pivot table and double click Sum of Sales to open Value Field Settings dialog, and select Max or Min from the Summarize value field by list under Summarize Values By tab, at last click OK. See screenshot:
5. Click OK to close the dialog. And you can see each group’s max/min value is shown.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 8 months agohow to find max value if the value is not entered in ascending order
- To post as a guest, your comment is unpublished.· 1 years agoReally helpful, exactly what I was looking for
- To post as a guest, your comment is unpublished.· 3 years agoHow to find the minimum date for Compliance
=MIN(IF(AND('Cases Created'!C:C="Faults",'Cases Created'!D:D="Compliance"),'Cases Created'!I:I))
- To post as a guest, your comment is unpublished.· 3 years agothanks it help to resolve my issue. Great
- To post as a guest, your comment is unpublished.· 3 years agoThe below formula - a variation of the above proposed one - does not seem to work: i added a second criterion to the record selection using the AND function (always returns zero):
Any way around it?