Hi Guys,
Anyone can come up with an VBA which can help to rearranging database?
Please refer to the following.
Original:
[TABLE="width: 467"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Row Labels[/TD]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Sum of VR1600v (FTTN)[/TD]
[/TR]
[TR]
[TD]Jan-17[/TD]
[TD="align: right"]1100[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Feb-17[/TD]
[TD="align: right"]102[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Mar-17[/TD]
[TD="align: right"]144[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Apr-17[/TD]
[TD="align: right"]756[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]May-17[/TD]
[TD="align: right"]1050[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Jun-17[/TD]
[TD="align: right"]96[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Jul-17[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Aug-17[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]1108[/TD]
[/TR]
[TR]
[TD]Sep-17[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]780[/TD]
[/TR]
[TR]
[TD]Oct-17[/TD]
[TD="align: right"]864[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Nov-17[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]1700[/TD]
[/TR]
[TR]
[TD]Dec-17[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7120[/TD]
[/TR]
[TR]
[TD]Jan-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]796[/TD]
[/TR]
[TR]
[TD]Feb-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]707[/TD]
[/TR]
[TR]
[TD]Mar-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]114[/TD]
[/TR]
[TR]
[TD]Apr-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]11251[/TD]
[/TR]
[TR]
[TD]May-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1279[/TD]
[/TR]
[TR]
[TD]Jun-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1337[/TD]
[/TR]
[TR]
[TD]Jul-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1416[/TD]
[/TR]
[TR]
[TD]Aug-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]650[/TD]
[/TR]
[TR]
[TD]Sep-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Oct-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Nov-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Dec-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
Desire:
[TABLE="width: 432"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jan-17[/TD]
[TD="align: right"]1100[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Feb-17[/TD]
[TD="align: right"]1032[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Mar-17[/TD]
[TD="align: right"]1454[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Apr-17[/TD]
[TD="align: right"]756[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]May-17[/TD]
[TD="align: right"]1050[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jun-17[/TD]
[TD="align: right"]96[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jul-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Aug-17[/TD]
[TD="align: right"]840[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Sep-17[/TD]
[TD="align: right"]576[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Oct-17[/TD]
[TD="align: right"]864[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Nov-17[/TD]
[TD="align: right"]720[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Dec-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jan-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Feb-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Mar-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Apr-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]May-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jun-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jul-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Aug-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Sep-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Oct-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Nov-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Dec-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jan-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Feb-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Mar-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Apr-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]May-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jun-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jul-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Aug-17[/TD]
[TD="align: right"]11208[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Sep-17[/TD]
[TD="align: right"]7680[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Oct-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Nov-17[/TD]
[TD="align: right"]10700[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Dec-17[/TD]
[TD="align: right"]7120[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jan-18[/TD]
[TD="align: right"]796[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Feb-18[/TD]
[TD="align: right"]7707[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Mar-18[/TD]
[TD="align: right"]11104[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Apr-18[/TD]
[TD="align: right"]11251[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]May-18[/TD]
[TD="align: right"]12079[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jun-18[/TD]
[TD="align: right"]13317[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jul-18[/TD]
[TD="align: right"]14816[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Aug-18[/TD]
[TD="align: right"]6504[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Sep-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Oct-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Nov-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Dec-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
Basically
1. Put header in front of the date column.
2. Copy and paste the corresponding amount to the third column.
This case I show is simplified case. I have 50+ column I need to rearrange to this format.
I am thinking there will be some kind of VBA to loop through the process.
Much appreciate the help.
Logit I know you are here to help.
Anyone can come up with an VBA which can help to rearranging database?
Please refer to the following.
Original:
[TABLE="width: 467"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Row Labels[/TD]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Sum of VR1600v (FTTN)[/TD]
[/TR]
[TR]
[TD]Jan-17[/TD]
[TD="align: right"]1100[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Feb-17[/TD]
[TD="align: right"]102[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Mar-17[/TD]
[TD="align: right"]144[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Apr-17[/TD]
[TD="align: right"]756[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]May-17[/TD]
[TD="align: right"]1050[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Jun-17[/TD]
[TD="align: right"]96[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Jul-17[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Aug-17[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]1108[/TD]
[/TR]
[TR]
[TD]Sep-17[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]780[/TD]
[/TR]
[TR]
[TD]Oct-17[/TD]
[TD="align: right"]864[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Nov-17[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]1700[/TD]
[/TR]
[TR]
[TD]Dec-17[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7120[/TD]
[/TR]
[TR]
[TD]Jan-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]796[/TD]
[/TR]
[TR]
[TD]Feb-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]707[/TD]
[/TR]
[TR]
[TD]Mar-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]114[/TD]
[/TR]
[TR]
[TD]Apr-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]11251[/TD]
[/TR]
[TR]
[TD]May-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1279[/TD]
[/TR]
[TR]
[TD]Jun-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1337[/TD]
[/TR]
[TR]
[TD]Jul-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1416[/TD]
[/TR]
[TR]
[TD]Aug-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]650[/TD]
[/TR]
[TR]
[TD]Sep-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Oct-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Nov-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Dec-18[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
Desire:
[TABLE="width: 432"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jan-17[/TD]
[TD="align: right"]1100[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Feb-17[/TD]
[TD="align: right"]1032[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Mar-17[/TD]
[TD="align: right"]1454[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Apr-17[/TD]
[TD="align: right"]756[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]May-17[/TD]
[TD="align: right"]1050[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jun-17[/TD]
[TD="align: right"]96[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jul-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Aug-17[/TD]
[TD="align: right"]840[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Sep-17[/TD]
[TD="align: right"]576[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Oct-17[/TD]
[TD="align: right"]864[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Nov-17[/TD]
[TD="align: right"]720[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Dec-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jan-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Feb-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Mar-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Apr-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]May-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jun-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Jul-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Aug-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Sep-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Oct-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Nov-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of HG658 VDSL - iiNet[/TD]
[TD]Dec-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jan-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Feb-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Mar-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Apr-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]May-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jun-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jul-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Aug-17[/TD]
[TD="align: right"]11208[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Sep-17[/TD]
[TD="align: right"]7680[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Oct-17[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Nov-17[/TD]
[TD="align: right"]10700[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Dec-17[/TD]
[TD="align: right"]7120[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jan-18[/TD]
[TD="align: right"]796[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Feb-18[/TD]
[TD="align: right"]7707[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Mar-18[/TD]
[TD="align: right"]11104[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Apr-18[/TD]
[TD="align: right"]11251[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]May-18[/TD]
[TD="align: right"]12079[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jun-18[/TD]
[TD="align: right"]13317[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Jul-18[/TD]
[TD="align: right"]14816[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Aug-18[/TD]
[TD="align: right"]6504[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Sep-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Oct-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Nov-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Sum of VR1600v (FTTN)[/TD]
[TD]Dec-18[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
Basically
1. Put header in front of the date column.
2. Copy and paste the corresponding amount to the third column.
This case I show is simplified case. I have 50+ column I need to rearrange to this format.
I am thinking there will be some kind of VBA to loop through the process.
Much appreciate the help.
Logit I know you are here to help.