Hello Excel Gurus,
I'm trying to write a code that will transform my data from singular columns to multiple rows. My data is currently organized like this;
[TABLE="width: 500"]
<tbody>[TR]
[TD]Index[/TD]
[TD]Budget View[/TD]
[TD]1/1/2018[/TD]
[TD]2/1/2018[/TD]
[TD]3/1/2018[/TD]
[TD]4/1/2018[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]$10.00[/TD]
[TD]$10.00[/TD]
[TD]$10.00[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]$10.00[/TD]
[TD]$0.00[/TD]
[TD]$5.00[/TD]
[TD]$5.00[/TD]
[/TR]
</tbody>[/TABLE]
I need a code that will loop through each row to transform the information into this format. Any help is greatly appreciated. Thanks.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Index[/TD]
[TD]Budget View[/TD]
[TD]Date[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]1/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]2/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]3/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]4/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]1/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]2/1/2018[/TD]
[TD]$0.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]3/1/2018[/TD]
[TD]$5.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]4/1/2018[/TD]
[TD]$5.00[/TD]
[/TR]
</tbody>[/TABLE]
I'm trying to write a code that will transform my data from singular columns to multiple rows. My data is currently organized like this;
[TABLE="width: 500"]
<tbody>[TR]
[TD]Index[/TD]
[TD]Budget View[/TD]
[TD]1/1/2018[/TD]
[TD]2/1/2018[/TD]
[TD]3/1/2018[/TD]
[TD]4/1/2018[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]$10.00[/TD]
[TD]$10.00[/TD]
[TD]$10.00[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]$10.00[/TD]
[TD]$0.00[/TD]
[TD]$5.00[/TD]
[TD]$5.00[/TD]
[/TR]
</tbody>[/TABLE]
I need a code that will loop through each row to transform the information into this format. Any help is greatly appreciated. Thanks.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Index[/TD]
[TD]Budget View[/TD]
[TD]Date[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]1/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]2/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]3/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Budget[/TD]
[TD]4/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]1/1/2018[/TD]
[TD]$10.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]2/1/2018[/TD]
[TD]$0.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]3/1/2018[/TD]
[TD]$5.00[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]Forecast[/TD]
[TD]4/1/2018[/TD]
[TD]$5.00[/TD]
[/TR]
</tbody>[/TABLE]