Reorganizing table data

mrpolyglot

New Member
Joined
Apr 15, 2014
Messages
3
Hello,

Try as I might, I cannot perform the following task.

I have a 3-column table with 5 rows of data:

Column A, Column B, Column C
2, 14, 29
7, 8, 16
3, 34, 27
18, 1, 5
1, 19, 4

I need to reorder the above data such that the data would appear in Column D and Column E as follows:

Column D, Column E
2, 14
7, 8
3, 34
18, 1
1, 19
14, 29
8, 16
34, 27
1, 5
19, 4

Your help is greatly appreciated. Thank you in advance.
 
data is like this

Excel Workbook
ABC
1hdng1hdng2hdng3
221429
37816
433427
51815
61194
Sheet1




try this macro test

Code:
Sub test()
Dim r As Range, c As Range, k As Integer
Application.ScreenUpdating = False
Worksheets("sheet2").Cells.Clear
With Worksheets("sheet1")
k = 0
Set r = Range(.Range("A2"), .Range("A2").End(xlDown))
Do
For Each c In r
Set c = c.Offset(0, k)
Range(c, c.Offset(0, 1)).Copy
With Worksheets("sheet2")
.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial
End With
Next c
k = k + 1
If k > 1 Then Exit Do
Loop
End With
Application.CutCopyMode = False
Application.ScreenUpdating = True
MsgBox "macro over"
End Sub
 
Upvote 0

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