Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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!!! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Using macro/vba to copy varying ranges of rows
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!!! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying cells from varying rows | Excel Discussion (Misc queries) | |||
Alternating shading of varying groups of rows | Excel Discussion (Misc queries) | |||
SUMPRODUCT with varying # of rows | Excel Worksheet Functions | |||
Create a Macro that will copy the rows that have a value < 0 | Excel Discussion (Misc queries) | |||
How do I chart date ranges with varying start and finish dates? | Charts and Charting in Excel |