0

I am trying to create a macro that will copy cells E2:E3 from "sheet 1" which is a monthly output and shows the previous months sales to then paste these figures into "sheet 2" under the relevant month.

The months in sheet 2 are per column so M = september N = October and so on

I have used macro record to get the following

Windows("Sheet1.xlsx").Activate
    Range("E2:E5").Select
    Selection.Copy
    
    Windows("Sheet2.xlsm").Activate
    Range("M7").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

But this is tied to always paste in M7 and I need it to move based on the month

  • You want to [avoid using Select](https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba) in your code. Doing so should also make what you want to do easier – cybernetic.nomad Oct 06 '22 at 14:34

0 Answers0