Group by SUM

A

arun.darra

Hi,

I am need some help with this, i am absolutly new to vba.
I have a worksheet with two colums as given below
Id value
1 10
1 10
1 10
2 10
2 10
3 10
3 10
3 10

I want to SUM the values column based on the Id, that i mean is i want
to write a VBA macro that helps me generate an output of the form:


Id value
1 10
1 10
1 10
30
2 10
2 10
20

3 10
3 10
3 10
30

Any help is really really appretiated

Thanks
 
J

JE McGimpsey

While you can do this with a macro, you may find it much easier to use
Data/Subtotals...
 
A

arun.darra

While you can do this with a macro, you may find it much easier to use
Data/Subtotals...

Could you be kind enough to give me an example
or point me to some link where i can get more info

i am new to vba
 
J

JE McGimpsey

My suggestion (Data/Subtotals) doesn't require VBA. See the "About
subtotals and grand totals" topic in XL Help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top