I'm trying to automate a macro in an Excel Worksheet. I have a big table on the first worksheet with a variable number of rows, and I need to create a number of "plates" (group of 5 rows with certain data) for each row of the main worksheet (posted in the attached image). The plates need to be displayed as in the screenshot in order to be exported in a .pdf file (2 on the same level until the last one)
This is the code I came up to using macro recording and other macro found around and already working for me (pdf printing):
Sheets("Summary").Select
lastRow = Cells(Rows.Count, 1).End(xlUp).Row
first_row = "A2"
sec_row = "F2"
For i = 1 To lastRow
Sheets("Foglio1").Select
Range("S3:V7").Select
Selection.Copy
Range("first_row:first_row+4").Select
ActiveSheet.Paste
Range("sec_row:sec_row+4").Select
ActiveSheet.Paste
i = i + 2
Next
After this I have a code part where I export the selected area as pdf (easy and is working).

