+ Reply to Thread
Results 1 to 13 of 13

Copy and paste data to separate sheets based on mutiple criteria again

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Copy and paste data to separate sheets based on mutiple criteria again

    I had a problem solved for me previously here. However, I now have additional data that needs to be copied over to a new sheet. This data includes blank cells.

    I embedded an If statement to help fix the issue, but it doesn't seem to work.

    Please Login or Register  to view this content.
    Can anyone tell me what I'm doing wrong? I've attached my sample.
    Attached Files Attached Files
    Last edited by Ricker090; 04-27-2011 at 01:50 PM. Reason: Solved

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    Hello Ricker090,

    It would help to know what the expected outcome looks like.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    Sorry about that.

    I've attached the expected outcome.
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    Hello Ricker090,

    Thanks for doing that. I didn't mean for you do that much work. Just a few sheets would have been fine.

  5. #5
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    It wasn't a problem. I actually let the macro create the sheets, I just manually copied and pasted the additional data.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    Hello Ricker090,

    Sorry for the delay. I have rewrote the macro to be more flexible and faster. A button has been added to "Sheet1" to run the macro. Here is the revised macro code...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    Holy Crap! It's awesome. Thanks!

  8. #8
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    I had a quick follow up question. If I wanted to paste my header and subsiquent data starting in row 7, how would I modify the code? I attempted to modify the If statement that pasted the header with the following code, but I takes the next line of data and pastes it into row 1.

    Please Login or Register  to view this content.

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    Hello Ricker090,

    Change the NextRow number from 1 to 7...
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    I tried that and it and doesn't copy the header over. Any other suggestions?

  11. #11
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    Hello Ricker090,

    I changed the macro to start at "A7" on the individual destination sheets. The macro has been tested and works. Replace your old macro with this code.
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Copy and paste data to separate sheets based on mutiple criteria again

    That did it! I'm greatful for everything that you've done. Thank you so much.

  13. #13
    Registered User
    Join Date
    07-13-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    1

    Smile Re: Copy and paste data to separate sheets based on mutiple criteria again

    Holy crap...this is amazing!! I modified the VBA code for my purpose and it works great. THANK YOU!!!

+ 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