Move two rows at the same time to adjacent columns

Gogators

New Member
Joined
Apr 12, 2016
Messages
15
Hi, please help.

My original table is:


Row
[TABLE="width: 500"]
<tbody>[TR]
[TD]1[/TD]
[TD]Title 1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Description1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Title 2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Description 2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Title 3[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Description 3[/TD]
[/TR]
</tbody>[/TABLE]


I need the following result:


[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]Title1[/TD]
[TD]Title 2[/TD]
[TD]Title 3[/TD]
[/TR]
[TR]
[TD]Description 1[/TD]
[TD]Description 2[/TD]
[TD]Description3[/TD]
[/TR]
</tbody>[/TABLE]

I appreciate your help, thanks in advance.

Joe
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try this

Code:
Sub Move_two_rows()
    Dim i As Long, j As Long
    j = 2
    For i = 3 To Range("A" & Rows.Count).End(xlUp).Row Step 2
        Range("A" & i).Resize(2, 1).Cut Destination:=Cells(1, j)
        j = j + 1
    Next
End Sub
 
Upvote 0
Thank you. I can't get to run this macro on my Excel for Mac, it hangs. Something's off, not the VBA, it's on my end.

Joe
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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