How to transpose data

ejecheche

New Member
Joined
Nov 1, 2012
Messages
3
[TABLE="class: cms_table"]
<tbody>[TR]
[TD="align: right"]791643
[/TD]
[TD="align: right"]-4,105.80[/TD]
[TD="align: right"]-4,105.80[/TD]
[/TR]
[TR]
[TD="align: right"]2/28/2006[/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-240[/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2006[/TD]
[TD="align: right"]-577.8[/TD]
[TD="align: right"]-577.8[/TD]
[/TR]
[TR]
[TD="align: right"]2/28/2007[/TD]
[TD="align: right"]-256.8[/TD]
[TD="align: right"]-256.8
[/TD]
[/TR]
[TR]
[TD="align: right"]3/31/2007[/TD]
[TD="align: right"]-271.2[/TD]
[TD="align: right"]-271.2[/TD]
[/TR]
[TR]
[TD="align: right"]4/30/2007[/TD]
[TD="align: right"]-345[/TD]
[TD="align: right"]-345[/TD]
[/TR]
[TR]
[TD="align: right"]5/31/2007[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-276[/TD]
[/TR]
[TR]
[TD="align: right"]6/30/2007[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-276
[/TD]
[/TR]
[TR]
[TD="align: right"]7/31/2007[/TD]
[TD="align: right"]-621[/TD]
[TD="align: right"]-621[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2007[/TD]
[TD="align: right"]-345[/TD]
[TD="align: right"]-345[/TD]
[/TR]
[TR]
[TD="align: right"]10/31/2007[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-276[/TD]
[/TR]
[TR]
[TD="align: right"]11/30/2007[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-276[/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2007[/TD]
[TD="align: right"]-345[/TD]
[TD="align: right"]-345[/TD]
[/TR]
[TR]
[TD="align: right"]791647
[/TD]
[TD="align: right"]-13,800.00[/TD]
[TD="align: right"]-13,800.00[/TD]
[/TR]
[TR]
[TD="align: right"]2/28/2006[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2006[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[/TR]
[TR]
[TD="align: right"]1/31/2007[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[/TR]
[TR]
[TD="align: right"]2/28/2007[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[/TR]
[TR]
[TD="align: right"]3/31/2007[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[/TR]
[TR]
[TD="align: right"]4/30/2007[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[/TR]
[TR]
[TD="align: right"]5/31/2007[/TD]
[TD="align: right"]-644.49[/TD]
[TD="align: right"]-644.49[/TD]
[/TR]
[TR]
[TD="align: right"]6/30/2007[/TD]
[TD="align: right"]-1,155.51[/TD]
[TD="align: right"]-1,155.51[/TD]
[/TR]
[TR]
[TD="align: right"]7/31/2007[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2007[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[/TR]
[TR]
[TD="align: right"]9/30/2007[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[/TR]
[TR]
[TD="align: right"]10/31/2007[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[/TR]
[TR]
[TD="align: right"]11/30/2007[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2007[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[/TR]
[TR]
[TD="align: right"]791648
[/TD]
[TD="align: right"]-7,053.33[/TD]
[TD="align: right"]-7,053.33[/TD]
[/TR]
[TR]
[TD="align: right"]2/28/2006[/TD]
[TD="align: right"]-352[/TD]
[TD="align: right"]-352[/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2006[/TD]
[TD="align: right"]-450.24[/TD]
[TD="align: right"]-450.24[/TD]
[/TR]
[TR]
[TD="align: right"]1/31/2007[/TD]
[TD="align: right"]-438.12[/TD]
[TD="align: right"]-438.12[/TD]
[/TR]
[TR]
[TD="align: right"]2/28/2007[/TD]
[TD="align: right"]-563.3[/TD]
[TD="align: right"]-563.3[/TD]
[/TR]
[TR]
[TD="align: right"]4/30/2007[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-477.24[/TD]
[/TR]
[TR]
[TD="align: right"]5/31/2007[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-477.24[/TD]
[/TR]
[TR]
[TD="align: right"]6/30/2007[/TD]
[TD="align: right"]-1,073.79[/TD]
[TD="align: right"]-1,073.79[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2007[/TD]
[TD="align: right"]-1,073.79[/TD]
[TD="align: right"]-1,073.79[/TD]
[/TR]
[TR]
[TD="align: right"]9/30/2007[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-477.24[/TD]
[/TR]
[TR]
[TD="align: right"]10/31/2007[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-477.24[/TD]
[/TR]
[TR]
[TD="align: right"]11/30/2007[/TD]
[TD="align: right"]-596.55[/TD]
[TD="align: right"]-596.55[/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2007[/TD]
[TD="align: right"]-596.58[/TD]
[TD="align: right"]-596.58[/TD]
[/TR]
[TR]
[TD="align: right"]791654
[/TD]
[TD="align: right"]-2,056.22[/TD]
[TD="align: right"]-2,056.23[/TD]
[/TR]
[TR]
[TD="align: right"]3/15/2007[/TD]
[TD="align: right"]-2,056.22[/TD]
[TD="align: right"]-2,056.23[/TD]
[/TR]
[TR]
[TD="align: right"]791655
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2006[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]1/31/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2/28/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]3/31/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]4/30/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]5/31/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]6/30/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]7/31/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]9/30/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10/31/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]11/30/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2007[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]791657
[/TD]
[TD="align: right"]-3,660.00[/TD]
[TD="align: right"]-3,660.00[/TD]
[/TR]
[TR]
[TD="align: right"]1/31/2007[/TD]
[TD="align: right"]-300[/TD]
[TD="align: right"]-300[/TD]
[/TR]
[TR]
[TD="align: right"]2/28/2007[/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-240[/TD]
[/TR]
[TR]
[TD="align: right"]3/31/2007[/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-240[/TD]
[/TR]
[TR]
[TD="align: right"]4/30/2007[/TD]
[TD="align: right"]-360[/TD]
[TD="align: right"]-360[/TD]
[/TR]
[TR]
[TD="align: right"]5/31/2007[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-288[/TD]
[/TR]
[TR]
[TD="align: right"]6/30/2007[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-288[/TD]
[/TR]
[TR]
[TD="align: right"]7/31/2007[/TD]
[TD="align: right"]-360[/TD]
[TD="align: right"]-360[/TD]
[/TR]
[TR]
[TD="align: right"]8/31/2007[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-288[/TD]
[/TR]
[TR]
[TD="align: right"]9/30/2007[/TD]
[TD="align: right"]-360[/TD]
[TD="align: right"]-360[/TD]
[/TR]
[TR]
[TD="align: right"]11/30/2007[/TD]
[TD="align: right"]-576[/TD]
[TD="align: right"]-576[/TD]
[/TR]
[TR]
[TD="align: right"]12/31/2007[/TD]
[TD="align: right"]-360[/TD]
[TD="align: right"]-360[/TD]
[/TR]
</tbody>[/TABLE]

Please help me transpose the data above to rows, i am really stuck. after the Macro, i am expecting this result:

[TABLE="class: cms_table"]
<tbody>[TR]
[TD] Ref Number
[/TD]
[TD="align: right"]2/28/2006
[/TD]
[TD="align: right"]12/31/2006[/TD]
[TD="align: right"]1/31/2007[/TD]
[TD="align: right"]2/28/2007[/TD]
[TD="align: right"]3/31/2007[/TD]
[TD="align: right"]4/30/2007[/TD]
[TD="align: right"]5/31/2007[/TD]
[TD="align: right"]6/30/2007[/TD]
[TD="align: right"]7/31/2007[/TD]
[TD="align: right"]8/31/2007[/TD]
[TD="align: right"]9/30/2007[/TD]
[TD="align: right"]10/31/2007[/TD]
[TD="align: right"]11/30/2007[/TD]
[TD="align: right"]12/31/2007[/TD]
[TD][/TD]
[TD="align: right"]2/28/2006[/TD]
[TD="align: right"]12/31/2006[/TD]
[TD="align: right"]1/31/2007[/TD]
[TD="align: right"]2/28/2007[/TD]
[TD="align: right"]3/31/2007[/TD]
[TD="align: right"]4/30/2007[/TD]
[TD="align: right"]5/31/2007[/TD]
[TD="align: right"]6/30/2007[/TD]
[TD="align: right"]7/31/2007[/TD]
[TD="align: right"]8/31/2007[/TD]
[TD="align: right"]9/30/2007[/TD]
[TD="align: right"]10/31/2007[/TD]
[TD="align: right"]11/30/2007[/TD]
[TD="align: right"]12/31/2007[/TD]
[/TR]
[TR]
[TD="align: right"]791643[/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-577.8[/TD]
[TD][/TD]
[TD="align: right"]-256.8[/TD]
[TD="align: right"]-271.2[/TD]
[TD="align: right"]-345[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-621[/TD]
[TD="align: right"]-345[/TD]
[TD][/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-345[/TD]
[TD][/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-577.8[/TD]
[TD][/TD]
[TD="align: right"]-256.8[/TD]
[TD="align: right"]-271.2[/TD]
[TD="align: right"]-345[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-621[/TD]
[TD="align: right"]-345[/TD]
[TD][/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-276[/TD]
[TD="align: right"]-345[/TD]
[/TR]
[TR]
[TD="align: right"]791647[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-644.49[/TD]
[TD="align: right"]-1,155.51[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD][/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-644.49[/TD]
[TD="align: right"]-1,155.51[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-900[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[TD="align: right"]-1,200.00[/TD]
[/TR]
[TR]
[TD="align: right"]791648[/TD]
[TD="align: right"]-352[/TD]
[TD="align: right"]-450.24[/TD]
[TD="align: right"]-438.12[/TD]
[TD="align: right"]-563.3[/TD]
[TD][/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-1,073.79[/TD]
[TD][/TD]
[TD="align: right"]-1,073.79[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-596.55[/TD]
[TD="align: right"]-596.58[/TD]
[TD][/TD]
[TD="align: right"]-352[/TD]
[TD="align: right"]-450.24[/TD]
[TD="align: right"]-438.12[/TD]
[TD="align: right"]-563.3[/TD]
[TD][/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-1,073.79[/TD]
[TD][/TD]
[TD="align: right"]-1,073.79[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-477.24[/TD]
[TD="align: right"]-596.55[/TD]
[TD="align: right"]-596.58[/TD]
[/TR]
[TR]
[TD="align: right"]791654[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]-2,056.22[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]-2,056.22[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]791655[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]791657[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]-300
[/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-360[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-360[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-360[/TD]
[TD][/TD]
[TD="align: right"]-576[/TD]
[TD="align: right"]-360[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]-300[/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-240[/TD]
[TD="align: right"]-360[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-360[/TD]
[TD="align: right"]-288[/TD]
[TD="align: right"]-360[/TD]
[TD][/TD]
[TD="align: right"]-576[/TD]
[TD="align: right"]-360[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Please note that i have 2 columns that i need transposed to rows and that each member (denoted by ref number) do not necessarily have a consistent number of rows-they may have blanks in some columns.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Welcome to the MrExcel board!

Note that I have deleted your other post in this thread as it was a duplicate of this one.

Questions of a duplicate nature will be locked or deleted, per the Posting Rules (especially points 21-23).
 
Upvote 0

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