LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Copy Data to Rows instead of Columns

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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy & Paste converting rows to columns Jacob Skaria Excel Discussion (Misc queries) 0 December 10th 09 06:20 AM
Copy formulas from rows & columns PERANISH Excel Worksheet Functions 4 May 27th 08 03:14 PM
Can't Copy/Cut Cells, Rows or Columns Pete Excel Discussion (Misc queries) 1 September 9th 07 05:18 AM
copy cells from columns to rows Libby Excel Discussion (Misc queries) 4 August 27th 07 08:08 PM
Copy values in columns to rows Carpe Diem Excel Worksheet Functions 0 December 20th 06 09:01 PM


All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"