Skip to content

Instantly share code, notes, and snippets.

@techenby
Created November 4, 2017 15:35
Show Gist options
  • Save techenby/aaf936a50f1d72f3a7bdb4d598c1e853 to your computer and use it in GitHub Desktop.
Save techenby/aaf936a50f1d72f3a7bdb4d598c1e853 to your computer and use it in GitHub Desktop.
Sub SplitInto15CellsPerColumn()
Dim X As Long, LastRow As Long, vArrIn As Variant, vArrOut As Variant
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
vArrIn = Range("A1:A" & LastRow)
ReDim vArrOut(1 To 25000, 1 To Int(LastRow / 25000) + 1)
For X = 0 To LastRow - 1
vArrOut(1 + (X Mod 25000), 1 + Int(X / 25000)) = vArrIn(X + 1, 1)
Next
Range("B1").Resize(25000, UBound(vArrOut, 2)) = vArrOut
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment