HI,
I have recorded a macro to move data from one spreadsheet to specific cells in another, this all works fine for me.
My issue is that i want this to be done on a monthly basis but one of the file names will change each month and the original dat will be on a different row each month.
To give you a better idea. I will have sales data for several months in one file, at present i am down to row 135 which is for March 2013, the macro will currently copy this data and paste it to specific cells within the March accounts. However when we move into April i will now want the macro to pick up off row 136 and paste it to a completley different file, the April accounts.
This is the first part of the Macro that i have created.
Sub Sales_Summary()
'
' Sales_Summary Macro
' To transfer sales from Sales Analysis v5 to the Sales Summary tab
'
'
Windows("Sales Analysis v5.xlsx").Activate
Range("T135:U135").Select
Selection.Copy
Windows("Data 1303.xlsm").Activate
Range("C10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Windows("Sales Analysis v5.xlsx").Activate
Range("V135:W135").Select
Selection.Copy
Windows("Data 1303.xlsm").Activate
Range("C13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Windows("Sales Analysis v5.xlsx").Activate
Range("X135:Y135").Select
Selection.Copy
Windows("Data 1303.xlsm").Activate
Range("C18").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
End Sub
Any ideas?
Cheers
Chris
Bookmarks