I am trying to write a macro using VBA where I go through each worksheet and copy the data into one main sheet
But there are multiple sheets where the data are in the same ranges and I don't want the data to overlap in the main sheet. So I am trying to create a macro where the copied data moves down a row as the code runs through each sheet. My code so far is not working. Here's what I have so far.
Sub copyrecursive() Dim ws As Worksheet Dim R As Range For Each ws In ActiveWorkbook.Worksheets For Each R In Range("A1:E2").Rows ws.Range("A1:E1").copy Worksheets("Sheet7").R.PasteSpecial Next R Next ws End Sub
So I want the range
Sheet1 to copy to
Sheet7 A1:E1 and then I want the range
Sheet2 to copy to
Sheet7 A2:E2. Hope this is a good enough explanation. Thank you for any help.