Hi, I'm new VBA macro and understand you should optimize code where possible. Any thoughts on optimizing this:
ActiveCell.Offset(2, -6).Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveCell.Offset(0, 6).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
For I = 1 To 8
ActiveCell.Offset(0, 2).Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveCell.Offset(0, 4).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next I
For I = 1 To 3
ActiveCell.Offset(0, 2).Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveCell.Offset(0, 2).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next I
All I'm doing is copying data from a column and pasting it a few columns over, moving a couple columns over and repeating this for 12 periods.
There are 3 different period lengths.
The first I'm pasting 6 columns over, then 4 columns over 8 times and finally 2 columns over 3 times.
Any help would be great!
Bookmarks