So I have ~39,000 lines of data and I need to split it into populations of 300 over 120 sheets. Everything is in 1 column and it doesnt need sorted in any particular fashion.
THis is the code I was working with
Option Explicit
Sub ColumnToSheets()
Dim LR As Long, Rw As Long, Sz As Long
Sz = Application.InputBox(300, Type:=1)
If Sz = 0 Then Exit Sub
Application.ScreenUpdating = False
With ActiveSheet
LR = .Range(“A1” & .Rows.Count).End(xlUp).Row
For Rw = 1 To LR Step Sz
Sheets.Add after:=Sheets(Sheets.Count)
.Range(“A” & Rw).Resize(Sz).Copy Range(A1, [A40000])
Next Rw
.Activate
End With
Application.ScreenUpdating = True
MsgBox “Done”
End Sub
But its not really working, this part is erroring out
LR = .Range(“A1” & .Rows.Count).End(xlUp).Row
For Rw = 1 To LR Step Sz
I have really only ever coded alerts and prompts so I am kind of at a loss here