Maybe:
Sub Maxyz()
Dim ws As Worksheet
Dim x As Long
Dim y As Long
Dim z As Long
Dim w As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set ws = ActiveSheet
x = InputBox("How many data per batch?")
y = 3
z = 1
w = x
Do Until y = 0
Workbooks.Add
ActiveWorkbook.SaveAs Filename:="D:\Common\data\IBMmain\" & "File" & z & "to" & x & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Sheets("Sheet1").Range("A1").EntireRow.Value = ws.Range("A1").EntireRow.Value
ws.Range("A" & z + 1 & ":" & "F" & x + 1).Copy Workbooks("File" & z & "to" & x & ".xls").Sheets("Sheet1").Range("A" & Rows.count).End(3)(2)
z = z + w
x = x + w
y = y - 1
Loop
Application.ScreenUpdating = True
Application.ScreenUpdating = True
End Sub
You will need to change the file path.
Bookmarks