+ Reply to Thread
Results 1 to 7 of 7

Select and Copy Range from Active Cell

  1. #1
    Registered User
    Join Date
    05-08-2006
    Posts
    77

    Select and Copy Range from Active Cell

    I've got my language wrong.

    I want my code to evaluate each cell in column B, and based on its value, copy the row from D to X and paste on the newly activated worksheet. I'm trying to use Offset, but it's not working.

    Please Login or Register  to view this content.
    Last edited by Leah; 10-21-2009 at 03:09 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Select and Copy Range from Active Cell

    Perhaps, if I've understood,

    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Select and Copy Range from Active Cell

    Based on its value...copy D:X... what value are your testing for? Anything?

    Without referring to your code, can you just explain verbally what you're macro is supposed to accomplish?

    For instance:
    "For every cell in B2:B200 that is not blank, copy D:X to another sheet. On the new sheet I want all the data without blanks"


    If you post up your sheet with perhaps an example BEFORE/AFTER, we can help more specifically.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    05-08-2006
    Posts
    77

    Re: Select and Copy Range from Active Cell

    Sheet1 is the total sheet

    Column B contains numbers, the team number a child has been assigned to.

    I want to go through column B, and if its value is 1, the child's information (which is contained in Columns D through X of that Row) will be copied and pasted into the first available Row (starting with A2) on the Team 1 page (Sheet2 in this case). I would then repeat the code to do the same for values 2, 3, and so on until each Team page contains all of its registrants.

    There are plenty of blank cells throughout the row, and the majority of Column X will be blank, which is why I'm hesitant to use an Endx1Up/Down.

    Is that clear?

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Select and Copy Range from Active Cell

    It might be an idea to outline the naming convention of your team sheets, using codenames is ok if they follow some logic.

    I would simply adapt that already provided

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-08-2006
    Posts
    77

    Re: Select and Copy Range from Active Cell

    That is perfect. And so simple! I will get there one day...one day.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Select and Copy Range from Active Cell

    I should add that in my prior example the sheet selection was based on Index position (ie physical position in file with 1 being leftmost sheet) which may/may not be correct.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1