jsneak4
04-20-2015, 01:58 AM
Morning all,
I've tried everything and i can't get this to work.. Basically I have 5 sheet tabs (one for each day) On another tab i have a column of data.
What I’m asking is - Is it possible to paste the data (The column) into the corresponding day, but only 5 times (So basically it would take 5 weeks to fill a Wednesday) and once the 5th time is done, the next week would go back to column 1 ?
The code i have currently is below.
Option Explicit
Sub MoveDaily()
Dim i As Integer
Dim strName As String
Dim LC As Long
i = 0
Sheets("Box Monitor by Batch").Select
Range("F:F").Copy
strName = Range("A1")
Sheets(strName).Select
LC = Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1).Column
Cells(1, LC).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Do Until i = 10
i = i + 1
Debug.Print i
Loop
End Sub
This works to the point of knowing which day it is and pasting the data into the correct tab but what im wanting is to have an average column that never needs to adjust the formula. The above code just pastes the information to the right of my average column
Hope this makes sense :think:
Thanks in advance!
I've tried everything and i can't get this to work.. Basically I have 5 sheet tabs (one for each day) On another tab i have a column of data.
What I’m asking is - Is it possible to paste the data (The column) into the corresponding day, but only 5 times (So basically it would take 5 weeks to fill a Wednesday) and once the 5th time is done, the next week would go back to column 1 ?
The code i have currently is below.
Option Explicit
Sub MoveDaily()
Dim i As Integer
Dim strName As String
Dim LC As Long
i = 0
Sheets("Box Monitor by Batch").Select
Range("F:F").Copy
strName = Range("A1")
Sheets(strName).Select
LC = Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1).Column
Cells(1, LC).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Do Until i = 10
i = i + 1
Debug.Print i
Loop
End Sub
This works to the point of knowing which day it is and pasting the data into the correct tab but what im wanting is to have an average column that never needs to adjust the formula. The above code just pastes the information to the right of my average column
Hope this makes sense :think:
Thanks in advance!