Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save evgenylavelin-xx/a4d30a67e378e6eb42e69c171f48593d to your computer and use it in GitHub Desktop.
Save evgenylavelin-xx/a4d30a67e378e6eb42e69c171f48593d to your computer and use it in GitHub Desktop.
Sub SplitSheet()
Dim i As Long, ws As Worksheet
Const maxCount As Double = 100
Application.ScreenUpdating = False: Set ws = ActiveSheet
For i = 1 To ws.UsedRange.Row + ws.UsedRange.Rows.Count - 1 Step maxCount
Sheets.Add After:=Worksheets(Worksheets.Count)
Sheets(1).Rows(i & ":" & i + maxCount).Copy Sheets(Sheets.Count).Range("A1")
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment