Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Copy and Paste at set Row counts

Hello Pros,

I got a VBA book, I got one, I wont be asking as much!!! Just one more.

At the moment I have a vba that copy and paste values which will change as
future weeks come about. But for this week its range AU7 to AW14. this
range at the moment is copied and the pasted in specific ranges I've placed
in the VBA, but the report is still evolving, new rows with different data
are being added, so every time I add a row, I have to change the row range
about 150 times. Is there a way, since the report has a specific format,
where it can just paste this initial copied pasgte of AU7:AW14 every 18 rows,
so if I add new rows, all I have to do is change the row count on the VBA,
not as difficult. Hope you understand and could help guys.

Regards,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Copy and Paste at set Row counts

Yes, but I don't understand your situation well enough to make a specific
recommendation. Is the range AU7:AW14 stable? Will it change? I guess it is
not clear to me what rows change. Where do the "new rows" get added and what
"row range" do you change, and how?

"JavyD" wrote in message
...
Hello Pros,

I got a VBA book, I got one, I wont be asking as much!!! Just one more.

At the moment I have a vba that copy and paste values which will change as
future weeks come about. But for this week its range AU7 to AW14. this
range at the moment is copied and the pasted in specific ranges I've

placed
in the VBA, but the report is still evolving, new rows with different data
are being added, so every time I add a row, I have to change the row range
about 150 times. Is there a way, since the report has a specific format,
where it can just paste this initial copied pasgte of AU7:AW14 every 18

rows,
so if I add new rows, all I have to do is change the row count on the VBA,
not as difficult. Hope you understand and could help guys.

Regards,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Copy and Paste at set Row counts

Bob this is what a portion of the VBA that I need to fix looks like. As you
can see, this has a large Range, not as large as others that I haveAs you can
see, the ranges are 47 rows apart.

Range("AU9:AU11").Select
Selection.Copy
Range( _

"AU9,AU56,AU103,AU150,AU197,AU244,AU291,AU338,AU38 5,AU432,AU479,AU526,AU573,AU620" _
).Select
Range("AU620").Activate
ActiveSheet.paste

"Bob Kilmer" wrote:

Yes, but I don't understand your situation well enough to make a specific
recommendation. Is the range AU7:AW14 stable? Will it change? I guess it is
not clear to me what rows change. Where do the "new rows" get added and what
"row range" do you change, and how?

"JavyD" wrote in message
...
Hello Pros,

I got a VBA book, I got one, I wont be asking as much!!! Just one more.

At the moment I have a vba that copy and paste values which will change as
future weeks come about. But for this week its range AU7 to AW14. this
range at the moment is copied and the pasted in specific ranges I've

placed
in the VBA, but the report is still evolving, new rows with different data
are being added, so every time I add a row, I have to change the row range
about 150 times. Is there a way, since the report has a specific format,
where it can just paste this initial copied pasgte of AU7:AW14 every 18

rows,
so if I add new rows, all I have to do is change the row count on the VBA,
not as difficult. Hope you understand and could help guys.

Regards,




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Copy and Paste at set Row counts

Due to the lack of further info i think he just needs to copy the
amount of found rows elsewhere and wants to have low maintenance.

Easy way in VBA would be to dynamically set the range, something like
this:
Range("AU7:AU" & LastFilledRownumberVariableHere).select
Selection.Copy

This way u dont need to do any manual changing of range everytime the
amount of rows change. Just make a loop to check for the last filled
row and asign it to a variable.

Cheers,
LM

"Bob Kilmer" wrote in message ...
Yes, but I don't understand your situation well enough to make a specific
recommendation. Is the range AU7:AW14 stable? Will it change? I guess it is
not clear to me what rows change. Where do the "new rows" get added and what
"row range" do you change, and how?

"JavyD" wrote in message
...
Hello Pros,

I got a VBA book, I got one, I wont be asking as much!!! Just one more.

At the moment I have a vba that copy and paste values which will change as
future weeks come about. But for this week its range AU7 to AW14. this
range at the moment is copied and the pasted in specific ranges I've

placed
in the VBA, but the report is still evolving, new rows with different data
are being added, so every time I add a row, I have to change the row range
about 150 times. Is there a way, since the report has a specific format,
where it can just paste this initial copied pasgte of AU7:AW14 every 18

rows,
so if I add new rows, all I have to do is change the row count on the VBA,
not as difficult. Hope you understand and could help guys.

Regards,

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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
How do I copy exact page counts in Excel? Lilly216 Excel Worksheet Functions 0 August 29th 08 05:00 PM
average daily counts to weekly counts Dave Excel Discussion (Misc queries) 0 June 17th 08 06:24 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
Macro to Copy/Paste then Paste to Next Line tomkarakowski Excel Programming 1 May 28th 04 01:19 AM


All times are GMT +1. The time now is 12:32 AM.

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"