Merging table rows

impuls666

New Member
Joined
May 9, 2018
Messages
1
Hello, I need some macro who can make from this table :

[TABLE="class: grid, width: 500"]
<colgroup><col style="width:48pt" width="64" span="2"> <col style="mso-width-source:userset;mso-width-alt:7606;width:156pt" width="208"> <col style="width:48pt" width="64" span="7"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]9
[/TD]
[TD="width: 64"]X
[/TD]
[TD="width: 208"]xxx
[/TD]
[TD="width: 64, align: right"]1[/TD]
[TD="width: 64"] [/TD]
[TD="width: 64"] [/TD]
[TD="width: 64"] [/TD]
[TD="width: 64, align: right"]1,00 €[/TD]
[TD="width: 64"] [/TD]
[TD="width: 64"] [/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]X
[/TD]
[TD]xxx
[/TD]
[TD] [/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]2,00 €[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]X
[/TD]
[TD]xxx
[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]3,00 €[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]Y
[/TD]
[TD]yyy
[/TD]
[TD="align: right"]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]1,00 €[/TD]
[TD] [/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]Y
[/TD]
[TD]yyy
[/TD]
[TD] [/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]2,00 €[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]Y
[/TD]
[TD]yyy[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]3,00 €
[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]Y
[/TD]
[TD]yyy[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]4,00 €[/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]

into this :

[TABLE="class: grid, width: 784"]
<colgroup><col span="2"><col><col span="7"></colgroup><tbody>[TR]
[TD="align: right"]9
[/TD]
[TD]X
[/TD]
[TD]xxx[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[TD="align: right"]1,00 €[/TD]
[TD="align: right"]2,00 €[/TD]
[TD="align: right"]3,00 €[/TD]
[/TR]
[TR]
[TD="align: right"]10
[/TD]
[TD]Y
[/TD]
[TD]yyy[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[TD="align: right"]1,00 €
[/TD]
[TD="align: right"]2,00 €
[/TD]
[TD="align: right"]3,00 €[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]Y
[/TD]
[TD]yyy[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 4,00 €
[/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]

It basically needs to merge rows with the same number in the first column together, but do not count the values together, when there are multiple in the same column

Thanks for help
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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