PDA

View Full Version : Copy certain range from the sheet matching conditions



kittykat
05-08-2007, 02:49 PM
Hi,

Is that possible to just copy the range between the cheerleader and number of activities.

Algorithm:

1. Find " Cheer leader"
2. Find " Number of activities after cheer leader" row.
3. Move the selection to cheer leader move 3 rows down and 7 columns.
4.Copy the rows from 3 until the no.of activities minus one row and paste them in sheet2.
5. The code should copy both the 1 and 2 columns until before of the number of activities.
6. No.of activities row should not be there in the sheet 2.
7. The code should check for number of activities as a key thing.

Please let me know how to accomplish this thru VBA.

lucas
05-08-2007, 03:07 PM
Request for Information:
could you post your workbook again and show us a before and an after.
1 I find Cheer Leader in a couple of places
2 I find Number of activities in a couple of places
3 Move selection where from what point?
4 copy which rows...
5. etc.

kittykat
05-08-2007, 03:22 PM
Dear Lucas,

Have attached a sample again. I have attached the outputs. It should basically check for # of activities. If found should copy the selected columns and the rows above the no of activities cell. No.of acti cells should be treated as the last row. With that as a reference should copy the range of cells in the selected column and paste it.

Guess i confused too much :(