D
Donnie Stone
The code below allows me to copy data from Sheet2, B1:B8, and paste it to
DATA, B1:B8, C1:C8 and so on until I get to column IV.
What I want to do is change the location of the data in Sheet2 to A2:H2 and
I would like the macro to paste the data to DATA, A2:H2, A3:H3 and so on.
I'm also using the Application On Time Now to run the macro every x minutes.
I would like this macro to run following the web query refresh. Is this
possible?
Thanks,
Donnie
Sub PasteToArchive()
Dim sourceRange As Range
Dim destRange As Range
Set sourceRange = Sheets("SHEET2").Range("B1:B8" & Range( _
"B" & Rows.Count).End(xlUp).Row)
Set destRange = Sheets("DATA").Range("IV1").End(xlToLeft).Offset( _
0, 1).Resize(sourceRange.Count, 1)
destRange.Value = sourceRange.Value
'code to run macro every ? minutes based on "DATA" A24
Application.OnTime Now + 1 / 1440 * Sheets("Sheet2").Range("D1"),
"PasteToArchive"
End Sub
DATA, B1:B8, C1:C8 and so on until I get to column IV.
What I want to do is change the location of the data in Sheet2 to A2:H2 and
I would like the macro to paste the data to DATA, A2:H2, A3:H3 and so on.
I'm also using the Application On Time Now to run the macro every x minutes.
I would like this macro to run following the web query refresh. Is this
possible?
Thanks,
Donnie
Sub PasteToArchive()
Dim sourceRange As Range
Dim destRange As Range
Set sourceRange = Sheets("SHEET2").Range("B1:B8" & Range( _
"B" & Rows.Count).End(xlUp).Row)
Set destRange = Sheets("DATA").Range("IV1").End(xlToLeft).Offset( _
0, 1).Resize(sourceRange.Count, 1)
destRange.Value = sourceRange.Value
'code to run macro every ? minutes based on "DATA" A24
Application.OnTime Now + 1 / 1440 * Sheets("Sheet2").Range("D1"),
"PasteToArchive"
End Sub