Forum Discussion
bofus
Dec 02, 2022Copper Contributor
colum split
I have a single column of 70K plus entries that I want to split into multiple columns of about 50 each. Any suggestions?
OliverScheurich
Dec 02, 2022Gold Contributor
Sub fifty()
Dim i As Long
Dim j As Long
Dim k As Long
Dim m As Long
i = Range("A" & Rows.Count).End(xlUp).Row
k = 3
m = 1
For j = 1 To i
Cells(m, k).Value = Cells(j, 1).Value
m = m + 1
If j Mod 50 = 0 Then
k = k + 1
m = 1
Else
End If
Next j
End SubMaybe with these lines of code. In the attached file you can click the button in cell B2 to run the macro.