blodesbaum
New Member
- Joined
- Mar 16, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Hey! So as the title explains, I have some sheets with different dynamic ranges, which I'd like to copy into one sheet. Here's the code I have so far:
Now I realise that the last range over-writes the first one. My question is, how can I copy them back to back? Also, I'd insist on keeping the code as much as possible the way it is.
Thanks a lot for your help!
VBA Code:
Workbooks("220312_Workplan_PP_AP.xlsm").Worksheets("Workplan").Range("C6:D2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("A5")
Workbooks("220312_Workplan_PP_CM.xlsm").Worksheets("Workplan").Range("C6:D2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("A5")
Workbooks("220312_Workplan_PP_LA.xlsm").Worksheets("Workplan").Range("C6:D2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("A5")
Workbooks("220312_Workplan_PP_AP.xlsm").Worksheets("Workplan").Range("E6:F2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("C5")
Workbooks("220312_Workplan_PP_CM.xlsm").Worksheets("Workplan").Range("E6:F2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("C5")
Workbooks("220312_Workplan_PP_LA.xlsm").Worksheets("Workplan").Range("E6:F2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("C5")
Workbooks("220312_Workplan_PP_AP.xlsm").Worksheets("Workplan").Range("H6:I2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("E5")
Workbooks("220312_Workplan_PP_CM.xlsm").Worksheets("Workplan").Range("H6:I2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("E5")
Workbooks("220312_Workplan_PP_LA.xlsm").Worksheets("Workplan").Range("H6:I2000").Copy _
Workbooks("MO_LD.xlsm").Worksheets("MO").Range("E5")
Now I realise that the last range over-writes the first one. My question is, how can I copy them back to back? Also, I'd insist on keeping the code as much as possible the way it is.
Thanks a lot for your help!