wrightyrx7
Well-known Member
- Joined
- Sep 15, 2011
- Messages
- 994
Hi all,
I have tried to record a macro to give me an idea of how the VBA code will go. I am trying to create a macro that will do the following:-
Copy data from a worksheet but as the number of rows changes every month it needs to be as follows.
Column H(lastrow +2) & Column I(lastrow +2)
then i want it to paste on my Summary worksheet. Here is the code from the recorded macro. As you can see with the first one i have tried changin it but it doesnt seem to work.
Any help would be great
Thanks
Chris
I have tried to record a macro to give me an idea of how the VBA code will go. I am trying to create a macro that will do the following:-
Copy data from a worksheet but as the number of rows changes every month it needs to be as follows.
Column H(lastrow +2) & Column I(lastrow +2)
then i want it to paste on my Summary worksheet. Here is the code from the recorded macro. As you can see with the first one i have tried changin it but it doesnt seem to work.
Sub Macro6()
Sheets("GMPF Added Years").Select
Range(LASTROW + 2, "H").Select
Selection.Copy
Sheets("Summary").Select
Range("B4").Select
ActiveSheet.Paste
Sheets("GMPF Added Years").Select
Range("I11").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Summary").Select
Range("C4").Select
ActiveSheet.Paste
Sheets("GMPF Add Reg Cont").Select
Range("H4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Summary").Select
Range("B5").Select
ActiveSheet.Paste
Sheets("GMPF Add Reg Cont").Select
Range("I4").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Summary").Select
Range("C5").Select
ActiveSheet.Paste
Sheets("GMPF").Select
Range("H1286").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Summary").Select
Range("B6").Select
ActiveSheet.Paste
Sheets("GMPF").Select
Range("I1286").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Summary").Select
Range("C6").Select
ActiveSheet.Paste
Sheets("GMPV AVC").Select
Range("H9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Summary").Select
ActiveSheet.Paste
Sheets("GMPV AVC").Select
Range("I9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Summary").Select
Range("C9").Select
ActiveSheet.Paste
Any help would be great
Thanks
Chris