Group similar cells and show the sum of values

BakirDZ

New Member
Joined
Sep 7, 2023
Messages
8
Office Version
  1. 2021
Platform
  1. Windows
Hello everyone, hope you're doing well

1708330073539.png


I have this table and I want to group the values for each letter like this :

1708330199894.png


of course the data I want to use this method for is not as simple and small as this example LOL
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Why not use Excel's built-in Subtotal feature (on the Data ribbon tab)

When you subtotal you get this

24 02 19.xlsm
AB
1LetterValue
2A5
3A12
4A14
5A Total31
6B7
7B10
8B Total17
9C1
10C4
11C Total5
12Grand Total53
Subtotal 1
Cell Formulas
RangeFormula
B5B5=SUBTOTAL(9,B2:B4)
B8,B11B8=SUBTOTAL(9,B6:B7)
B12B12=SUBTOTAL(9,B2:B10)


.. but if you only want the totals, click the '2' button at the top left to produce this

1708330633054.png
 
Upvote 1
Thank you for your help Peter_SSs, It's not exactly what I want to do, I have a long list of products in column A and some are duplicates.. I have the quantities for those products in column B what I'm trying to do is to group similar product names in one line and the quantity is the sum of all the quantities of that product

from this:
1708333961361.png

to this:
1708334108508.png



this example is more accurate.
 
Upvote 0
I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

Try something like this then

24 02 19.xlsm
ABCDE
1
2product12product120
3product25product237
4product3100product3125
5product15
6product18
7product314
8product311
9product232
10product15
Group and Sum
Cell Formulas
RangeFormula
D2:D4D2=UNIQUE(A2:A10)
E2:E4E2=SUMIF(A2:A10,D2#,B2:B10)
Dynamic array formulas.
 
Upvote 1
Solution
I'm not sure if I know what that is
If you mean XL2BB, it is an Add-In that lets you produce mini sheets like the one I posted in my previous post. They can easily be copied from the forum to a worksheet of your own. The link in that post (or in my signature block below) has more information.

thanks for your help !
You're welcome. Thanks for the follow-up.
 
Upvote 0

Forum statistics

Threads
1,224,844
Messages
6,181,294
Members
453,030
Latest member
PG626

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top