Create Multiple Worksheets and Copy data from Raw File 30 rows at a time and Paste to Newly created worksheets

johnalmaquer

New Member
Joined
Apr 21, 2016
Messages
18
Hoping someone could help me out. I have 17,000 rows and I need to copy 30 rows at a time under the header and paste those rows on the worksheet named Page 1 on row 13 column B. Then create a copy of Page 1 worksheet, rename it to Page 2 then copy the next 30 rows, repeat the same exercise after all rows have been copied.

My concern is that, I'm not sure if Excel can

shorturl.at/aqAI8

Anyone's assistance would be greatly appreciated.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
HI Rename the Page 1 sheet to Template & try
VBA Code:
Sub johnalmaquer()
   Dim i As Long, j As Long
   Dim Ws As Worksheet
   
   Application.ScreenUpdating = False
   Set Ws = Sheets("Template")
   With Sheets("Raw File")
      For i = 2 To .Range("A" & Rows.Count).End(xlUp).Row Step 30
         j = j + 1
         Ws.Copy , Sheets(j + 1)
         ActiveSheet.Name = "Page " & j
         Range("B13").Resize(30, 7).Value = .Range("A" & i).Resize(30, 7).Value
      Next i
   End With
   MsgBox "Complete"
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,856
Messages
6,127,365
Members
449,381
Latest member
Aircuart

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top