Consulting

Results 1 to 3 of 3

Thread: Selecting range relative to found values - Multiple Instances

  1. #1

    Selecting range relative to found values - Multiple Instances

    Hi all,

    I'm trying to select a relative range based on a value found in a worksheet. In the attached, my goal would be to find the text "Count" and copy everything 1 cell below Count down to 19 cells to the right of the text "Grand Total" . Not only that but I need to do the same for multiple instances of the same text in multiple tables on a worksheet. Each range would be copied, then pasted to another template.

    Then I need to proceed to the next sheet and do the same.




    What I'm basically looking for is

    Select Range: Find (in column B instance 1 of "Count")+1 row down: Find(Instance 1 of "Grand Total")+ 1 row right:19 rows right
    Copy


    Repeat for instance 2 etc....
    Template.xlsx
    Any help would be appreciated.

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,874
    See button on attached sheet and comments in the code of macro called blah2.

    It's probably overly complex as I was trying to ensure that instances of "Count" and "Grand Total" were properly paired, in case there were any missing instances of either causing more than one table to be copied.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Quote Originally Posted by p45cal View Post
    See button on attached sheet and comments in the code of macro called blah2.

    It's probably overly complex as I was trying to ensure that instances of "Count" and "Grand Total" were properly paired, in case there were any missing instances of either causing more than one table to be copied.
    Thanks p45cal for the help. Digging in now before the big OU OSU game.

Posting Permissions

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