Using macro/vba to copy varying ranges of rows

G

Guest

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!!!
 
G

Guest

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!
 
D

Don Guillett

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top