Excel_Learner29
New Member
- Joined
- Apr 1, 2019
- Messages
- 5
Hi Team,
I am looking some help on creating a macro which could help me sum values in column for B for similar text in col A and insert the sum field in col b for after every group its sums up and also insert a blank row after its sum the data
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64, align: left"]Names[/TD]
[TD="class: xl65, width: 64, align: left"]Value[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Apple[/TD]
[TD="align: right"]25[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Apple[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Orange[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Orange[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Milk[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Milk[/TD]
[TD="align: right"]40[/TD]
[/TR]
</tbody>[/TABLE]
Macro to return :-
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl67, width: 64"]Names[/TD]
[TD="class: xl67, width: 64"]Value[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Apple[/TD]
[TD="align: right"]25[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Apple[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66, align: right"]35[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Orange[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Orange[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66, align: right"]55[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Milk[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Milk[/TD]
[TD="align: right"]40[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl66, align: right"]60[/TD]
[/TR]
</tbody>[/TABLE]
Appreciate your help
I am looking some help on creating a macro which could help me sum values in column for B for similar text in col A and insert the sum field in col b for after every group its sums up and also insert a blank row after its sum the data
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64, align: left"]Names[/TD]
[TD="class: xl65, width: 64, align: left"]Value[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Apple[/TD]
[TD="align: right"]25[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Apple[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Orange[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Orange[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Milk[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Milk[/TD]
[TD="align: right"]40[/TD]
[/TR]
</tbody>[/TABLE]
Macro to return :-
[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl67, width: 64"]Names[/TD]
[TD="class: xl67, width: 64"]Value[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Apple[/TD]
[TD="align: right"]25[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Apple[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66, align: right"]35[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Orange[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Orange[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD="class: xl66, align: right"]55[/TD]
[/TR]
[TR]
[TD="class: xl65"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Milk[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="class: xl65, align: left"]Milk[/TD]
[TD="align: right"]40[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl66, align: right"]60[/TD]
[/TR]
</tbody>[/TABLE]
Appreciate your help