Need Macro to Group

InOverMyH3ad

New Member
Joined
Sep 17, 2018
Messages
9
Hello All,
I've been trying to find a macro to group data from a report. The problem is that the hierarchy it spits out is different so I have been having trouble finding code to work for my scenario. Below is how the data comes in and what it represents. I'm really stuck :/





[TABLE="class: grid, width: 150"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:5632;width:119pt" width="158"> </colgroup><tbody>[TR]
[TD="width: 158"]How the Data Comes In
[/TD]
[/TR]
[TR]
[TD]0
[/TD]
[/TR]
[TR]
[TD]1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[/TR]
[TR]
[TD]3[/TD]
[/TR]
[TR]
[TD]2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[/TR]
[TR]
[TD]2[/TD]
[/TR]
[TR]
[TD]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[/TR]
[TR]
[TD]2[/TD]
[/TR]
[TR]
[TD]1[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]


[TABLE="class: grid, width: 500"]
<colgroup><col style="mso-width-source:userset;mso-width-alt:3100;width:65pt" width="87"> <col style="mso-width-source:userset;mso-width-alt:4664;width:98pt" width="131"> <col style="width:48pt" width="64"> <col style="width:48pt" width="64" span="2"> <col style="mso-width-source:userset;mso-width-alt:6400;width:135pt" width="180"> </colgroup><tbody>[TR]
[TD="width: 410, colspan: 5, align: center"]What it Represents
[/TD]
[TD="width: 180"][/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Total Price of A-F[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]A[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of A[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]B[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of B[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of C1-C5[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD]C1
[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of C1.1-C1.2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]C1.1[/TD]
[TD] [/TD]
[TD="align: left"]Price of C1.1
[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]C1.2[/TD]
[TD] [/TD]
[TD="align: left"]Price of C2.2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD]C2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of C2.1-C2.3[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]C2.1[/TD]
[TD] [/TD]
[TD="align: left"]Price of C2.1[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]C2.2[/TD]
[TD] [/TD]
[TD="align: left"]Price of C2.2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]C2.3[/TD]
[TD] [/TD]
[TD="align: left"]Price of C2.3[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD]C3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of C3[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]D[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of D[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD]D1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of D1.1-D1.3[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]D1.1[/TD]
[TD] [/TD]
[TD="align: left"]Price of D1.1[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]D1.2[/TD]
[TD] [/TD]
[TD="align: left"]Price of D1.2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]D1.3[/TD]
[TD] [/TD]
[TD="align: left"]Price of D1.3[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD]D2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of D2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]E[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of E[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]F[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: left"]Price of F[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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