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.
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
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.
Recommended Productivity Tools
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.· 3 days agoReally helpful, exactly what I was looking for
To post as a guest, your comment is unpublished.· 2 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.· 2 years agothanks it help to resolve my issue. Great
To post as a guest, your comment is unpublished.· 2 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?