Consulting

Results 1 to 3 of 3

Thread: Copy certain range from the sheet matching conditions

  1. #1

    Copy certain range from the sheet matching conditions

    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.

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3

    New sample

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •