How to set range data would on next page with blank rows, eight cells down

Unicode

Board Regular
Joined
Apr 9, 2019
Messages
58
My Copy paste starts on "A122", continues running on next page, however, I tried inserting on purpose 8 additional rows for automatic insert after large data set runs from page 1 through all other pages. I need some help knowing why the last line of code does not include 8 rows down on next pages within same active worksheet. :confused:



Sub AddCopyPasteDataTenRowsDown()


Dim lastRow As Long
Dim Sheet2 As Worksheet
Dim lRow As Long, iRow As Long
Dim ws As Worksheet
Dim rng As Range
Dim r As Long






Set Results = Sheets("Sheet2")
lastRow = Results.Cells(Results.Rows.Count, "Z").End(xlUp).Row


Range("A2:B122,C2:d122").Copy
Results.Range("A" & lastRow + 10).PasteSpecial xlPasteAll




Application.DataEntryMode = False




ActiveWorkbook.Worksheets("Sheet1").PageSetup.CenterFooter = "Page " &
ActiveWorkbook.Worksheets("Sheet1").Index & " of " &
ActiveWorkbook.Sheets.Count
ActiveWorkbook.Worksheets("Sheet2").PageSetup.CenterFooter = "Page " &
ActiveWorkbook.Worksheets("Sheet2").Index & " of " &
ActiveWorkbook.Sheets.Count




Range("A1:A10").End(xlDown).EntireRow.Insert xlShiftDown


End Sub
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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