Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Using macro/vba to copy varying ranges of rows

Hi Everyone-

I am trying to come up with a vba script to copy a set of rows that can
change. The first and last row (in terms of content) will always be the
same. but the rows inbetween would/could change. I need the macro to start
copying a row where it finds a particular cell (based on what is in the cell)
and stop copying down rows once it finds another cell (based on what is in
the cell) For example:

Ex1: A set of rows that are 10 rows long. Cell b15 says "start example 1"
and cell b25 says "end example 1" A person adds 2 rows above the orginial
b15 and adds 5 rows inbetween the orginal B15 and B25. So now, "start
example 1" cell is on B17 and "end example 1" is on B32.

Thank you for any help/suggesstions you might have!!!
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Using macro/vba to copy varying ranges of rows

I'm still not quite sure what you want but this is the idea. If you still
can't figure it out send me a wb with DETAILED instructions of what you
want.


Just find the start and the end rows and use that
startrow=columns(2).find(value1).row
stoprow=
go from there.

--
Don Guillett
SalesAid Software

"BCLivell" wrote in message
...
Thank you for the suggestion. I am still unclear though on how to get the
code to automaticaly cut/copy the rows inbetween the two rows that I want
it
to look for. Thank you!

"Don Guillett" wrote:

Have a look in the vba help index for FIND
startrow=columns(2).find(etc

--
Don Guillett
SalesAid Software

"BCLivell" wrote in message
...
Hi Everyone-

I am trying to come up with a vba script to copy a set of rows that can
change. The first and last row (in terms of content) will always be
the
same. but the rows inbetween would/could change. I need the macro to
start
copying a row where it finds a particular cell (based on what is in the
cell)
and stop copying down rows once it finds another cell (based on what
is
in
the cell) For example:

Ex1: A set of rows that are 10 rows long. Cell b15 says "start example
1"
and cell b25 says "end example 1" A person adds 2 rows above the
orginial
b15 and adds 5 rows inbetween the orginal B15 and B25. So now, "start
example 1" cell is on B17 and "end example 1" is on B32.

Thank you for any help/suggesstions you might have!!!




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
Copying cells from varying rows annettek Excel Discussion (Misc queries) 2 May 25th 07 02:51 PM
Alternating shading of varying groups of rows AntDawg Excel Discussion (Misc queries) 3 July 16th 06 11:02 PM
SUMPRODUCT with varying # of rows Ren Excel Worksheet Functions 5 June 27th 06 11:28 PM
Create a Macro that will copy the rows that have a value < 0 wil4d Excel Discussion (Misc queries) 1 December 18th 05 05:28 PM
How do I chart date ranges with varying start and finish dates? projectplanner Charts and Charting in Excel 4 May 1st 05 11:36 PM


All times are GMT +1. The time now is 01:53 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"