Copy Items in row from One column sequence to separate columns

Cyphas

New Member
Joined
Oct 23, 2021
Messages
12
Office Version
  1. 365
Platform
  1. Windows
  2. Web
I Have data in a column like below a set of emails and associated numbers all in a sequenced flow. I want this to be transposed somewhat with their corresponding sequence on the same row in different columns. How can this be done
So, for example
John E
something@domain.com
50.
22
Margaret S
lala@anotherdom.com
2
44
...etc


In the pasted table I have done it to show.



Name 1Name ColEmail ColTotal ColEarn Col
Email 1Name1Email1Total1Earn1
Total1Name2Email2Total2Earn2
Earn1Name3Email3Total3Earn3
Name 2Name4Email4Total4Earn4
Email 2Name5Email5Total5Earn5
Total2
Earn2
Name 3
Email 3
Total3
Earn3
Name 4
Email 4
Total4
Earn4
Name 5
Email 5
Total5
Earn5
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
VBA Code:
Sub ReorgData()
Dim R As Range, i As Long
Set R = Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
Application.ScreenUpdating = False
Range("D:G").ClearContents
Range("D1:G1").Value = Array("Name", "Email", "Total", "Earn")
For i = 1 To R.Count Step 4
    Cells(i, "A").Resize(4, 1).Copy
    Cells(Rows.Count, "D").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlValues, Transpose:=True
Next i
Range("D:G").EntireColumn.AutoFit
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Solution
VBA Code:
Sub ReorgData()
Dim R As Range, i As Long
Set R = Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
Application.ScreenUpdating = False
Range("D:G").ClearContents
Range("D1:G1").Value = Array("Name", "Email", "Total", "Earn")
For i = 1 To R.Count Step 4
    Cells(i, "A").Resize(4, 1).Copy
    Cells(Rows.Count, "D").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlValues, Transpose:=True
Next i
Range("D:G").EntireColumn.AutoFit
Application.ScreenUpdating = True
End Sub
Super Awesome! Works like a charm. Thank you @JoeMo . Much appreciated. How can one repay?

Best regards
Devereaux
 
Upvote 0

Forum statistics

Threads
1,215,262
Messages
6,123,939
Members
449,134
Latest member
NickWBA

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