How to sum values by group in Excel?
Here are two columns, one is the product name, and the other is Sales. Now I want to sum the sales by the same product as below screenshot shown. How can I solve it in Excel?
Sum values by group with using formula
Calculate or combine values by group with using Kutools for Excel
Sum values by group with using formula
You can sum values by group with one formula easily in Excel.
Select next cell to the data range, type this =IF(A2=A1,"",SUMIF(A:A,A2,B:B)), (A2 is the relative cell you want to sum based on, A1 is the column header, A:A is the column you want to sum based on, the B:B is the column you want to sum the values.) Press Enter key, drag fill handle down to the cells to fill the formula.
Calculate or combine values by group with using Kutools for Excel
If you want to do other calculations by groups, such count, find max or min value, or combine values based on group, you can try Kutools for Excel’s Advanced Combine Rows utility.
Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. | ||
After free installing Kutools for Excel, please do as below:
1. Select the data range then click Kutools > Merge & Split > Advanced Combine Rows.
2. In the Advanced Combine Rows dialog, please do as these:
1) Specify a column as the key column which is used to calculate or combine values based on;
2) Choose an option in one operation as you need.
3. Click Ok, then the values will be calculated or combined as below screenshot shown:
Sum by group | Combine by group |
![]() |
![]() |
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!







