Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Copying Rows That Change Dynamically

I'm writing a macro for Excel that will copy large ranges of data and paste
into a new worksheet preserving the historical data. The number of rows to
copy changes dynamically on almost a daily basis.

Is there a function that can be written into a macro to change the range
selectiion each time new data is available. Each row is a transaction record.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Macro Copying Rows That Change Dynamically

See Ron de Bruin's site

http://www.rondebruin.nl/tips.htm

Browse through the section on Copy/Paste/Merge examples


Gord Dibben MS Excel MVP

On Fri, 28 Sep 2007 10:07:01 -0700, Bill Lowry <Bill
wrote:

I'm writing a macro for Excel that will copy large ranges of data and paste
into a new worksheet preserving the historical data. The number of rows to
copy changes dynamically on almost a daily basis.

Is there a function that can be written into a macro to change the range
selectiion each time new data is available. Each row is a transaction record.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro Copying Rows That Change Dynamically


Dim r as Range, r1 as Range
with worksheets("Destination")
set r = .cells(rows.count,1).End(xlup).row
End with
with worksheets("Data")
set r1 = .Range("A1").CurrentRegion
r1.offset(1,0).copy r(2)
End With

--
Regards,
Tom Ogilvy



"Bill Lowry" wrote:

I'm writing a macro for Excel that will copy large ranges of data and paste
into a new worksheet preserving the historical data. The number of rows to
copy changes dynamically on almost a daily basis.

Is there a function that can be written into a macro to change the range
selectiion each time new data is available. Each row is a transaction record.

Reply
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
Dynamically copying data thanksforhelp Excel Programming 0 August 1st 07 12:56 AM
Adding rows dynamically via macro sleepingdragon2k2 Excel Programming 1 November 28th 06 08:45 PM
Adding rows dynamically via macro sleepingdragon2k2 Excel Programming 2 November 28th 06 07:26 PM
Adding rows dynamically via macro sleepingdragon2k2 Excel Programming 0 November 28th 06 06:46 PM
Copying font and pattern dynamically RTP Excel Discussion (Misc queries) 1 June 23rd 05 11:55 PM


All times are GMT +1. The time now is 06:10 PM.

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

About Us

"It's about Microsoft Excel"