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.
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.
Best Office Productivity Tools
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!