I need to create a sheet whereby a copied section repeats a variable number of times.
The below is what i have come up with. It is written to find the first empty row in the sheet paste in the copied selection. Then repeat as many times as per the number in cell AH2.
Right now my macro is only pasting once regardless of what I try.
The below is what i have come up with. It is written to find the first empty row in the sheet paste in the copied selection. Then repeat as many times as per the number in cell AH2.
Right now my macro is only pasting once regardless of what I try.
Rich (BB code):
Rich (BB code):
Sub Z_CreateRepeatedSections()
Dim i As Long
Dim LastRowColumnX As Long
LastRowColumnX = Cells(Rows.Count, 1).End(xlUp).Row
Range("A17:T28").Copy
For i = 1 To Range("AH2").Value
Range("A" & LastRowColumnX + 1).Select
ActiveSheet.Paste
Next i
End Sub