Hi all,
I wonder if you could help me please?
I have a worksheet called "Summary".
I have lots of other sheets too and sheets which have a name beginning with the letters "CAL" have got data tables in them.
Ideally I would have a macro that loops through all sheets which begin with "CAL" and copies the data table into the "Summary" sheet, one underneath the other.
My problem is with the looping. Below is the code I currently have.
Thank you!
For Each xSheet In ActiveWorkbook.Worksheets
If xSheet.Name Like "CAL*" Then
i = .Cells(Rows.Count, 13).End(xlUp).Row
j = Sheets("Summary").Cells(Rows.Count, 1).End(xlUp).Row
.Range(.Cells(2, 13), .Cells(i, 21)).Copy
Sheets("Summary").Cells(j, 1).PasteSpecial Paste:=xlPasteValues
End If
Next
Bookmarks