moramramesh
New Member
- Joined
- May 22, 2019
- Messages
- 17
Hi All,
I need macro for the below task.
I need to copy each set of data under each header from column B to column D, column E, and so on.
[TABLE="width: 138"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]Server1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD]Date1[/TD]
[TD]Value1[/TD]
[/TR]
[TR]
[TD]Date2[/TD]
[TD]Value2[/TD]
[/TR]
[TR]
[TD]Date3[/TD]
[TD]Value3[/TD]
[/TR]
[TR]
[TD]Date4[/TD]
[TD]Value4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Server2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD]Date1[/TD]
[TD]Value1[/TD]
[/TR]
[TR]
[TD]Date2[/TD]
[TD]Value2[/TD]
[/TR]
[TR]
[TD]Date3[/TD]
[TD]Value3[/TD]
[/TR]
[TR]
[TD]Date4[/TD]
[TD]Value4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Server3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Server4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD]Date1[/TD]
[TD]Value1[/TD]
[/TR]
[TR]
[TD]Date2[/TD]
[TD]Value2[/TD]
[/TR]
[TR]
[TD]Date3[/TD]
[TD]Value3[/TD]
[/TR]
[TR]
[TD]Date4[/TD]
[TD]Value4[/TD]
[/TR]
</tbody>[/TABLE]
Target state (I want the above values from col B to be pasted to col D, col E etc in horizontal direction to plot the graph):
[TABLE="width: 275"]
<colgroup><col><col span="2"><col></colgroup><tbody>[TR]
[TD]Column D[/TD]
[TD]Column E[/TD]
[TD]Column F[/TD]
[TD]Column G[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header2[/TD]
[TD]Header2[/TD]
[TD]Header2[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD]Value1[/TD]
[TD]Value1[/TD]
[TD][/TD]
[TD]Value1[/TD]
[/TR]
[TR]
[TD]Value2[/TD]
[TD]Value2[/TD]
[TD][/TD]
[TD]Value2[/TD]
[/TR]
[TR]
[TD]Value3[/TD]
[TD]Value3[/TD]
[TD][/TD]
[TD]Value3[/TD]
[/TR]
[TR]
[TD]Value4[/TD]
[TD]Value4[/TD]
[TD][/TD]
[TD]Value4[/TD]
[/TR]
</tbody>[/TABLE]
Note: There are empty rows between server names and headers. Also there are empty rows between values and server names
I need macro for the below task.
I need to copy each set of data under each header from column B to column D, column E, and so on.
[TABLE="width: 138"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]Server1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD]Date1[/TD]
[TD]Value1[/TD]
[/TR]
[TR]
[TD]Date2[/TD]
[TD]Value2[/TD]
[/TR]
[TR]
[TD]Date3[/TD]
[TD]Value3[/TD]
[/TR]
[TR]
[TD]Date4[/TD]
[TD]Value4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Server2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD]Date1[/TD]
[TD]Value1[/TD]
[/TR]
[TR]
[TD]Date2[/TD]
[TD]Value2[/TD]
[/TR]
[TR]
[TD]Date3[/TD]
[TD]Value3[/TD]
[/TR]
[TR]
[TD]Date4[/TD]
[TD]Value4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Server3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Server4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD]Date1[/TD]
[TD]Value1[/TD]
[/TR]
[TR]
[TD]Date2[/TD]
[TD]Value2[/TD]
[/TR]
[TR]
[TD]Date3[/TD]
[TD]Value3[/TD]
[/TR]
[TR]
[TD]Date4[/TD]
[TD]Value4[/TD]
[/TR]
</tbody>[/TABLE]
Target state (I want the above values from col B to be pasted to col D, col E etc in horizontal direction to plot the graph):
[TABLE="width: 275"]
<colgroup><col><col span="2"><col></colgroup><tbody>[TR]
[TD]Column D[/TD]
[TD]Column E[/TD]
[TD]Column F[/TD]
[TD]Column G[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Header2[/TD]
[TD]Header2[/TD]
[TD]Header2[/TD]
[TD]Header2[/TD]
[/TR]
[TR]
[TD]Value1[/TD]
[TD]Value1[/TD]
[TD][/TD]
[TD]Value1[/TD]
[/TR]
[TR]
[TD]Value2[/TD]
[TD]Value2[/TD]
[TD][/TD]
[TD]Value2[/TD]
[/TR]
[TR]
[TD]Value3[/TD]
[TD]Value3[/TD]
[TD][/TD]
[TD]Value3[/TD]
[/TR]
[TR]
[TD]Value4[/TD]
[TD]Value4[/TD]
[TD][/TD]
[TD]Value4[/TD]
[/TR]
</tbody>[/TABLE]
Note: There are empty rows between server names and headers. Also there are empty rows between values and server names