Group by SUM

  • Thread starter Thread starter arun.darra
  • Start date Start date
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
 
No need for a macro - Data | Subtotals will do this for you:

for each change in ID, sum value

Hope this helps.

Pete
 

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

Similar Threads

Countifs or a pivot 1
Scrabble Value calculation for Welsh words 0
Group by SUM 3
Sumifs 2
Summing values within a value? 1
insert row when sum of values equals 100 2
Average problem 1
Allocation of values by time 3

Back
Top