+ Reply to Thread
Results 1 to 12 of 12

Macro To Copy Row Based On Boolean?

  1. #1
    Registered User
    Join Date
    03-28-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Macro To Copy Row Based On Boolean?

    Hello Everyone,
    I've been using these forums for quite some time but I am completely stuck, so this is my first post. I'm currently attempting to Copy rows from sheet "A" to sheet "B" based on a Boolean in column A sheet "A".

    The Code I have works, but I'm trying to figure out how to modify it so it doesn't sort the data on Sheet A and can be run from Sheet B.

    I continue to screw this up and do not know VBA well enough yet. Thank you in advance for any assistance you are able to give me it is much appreciated. Please let me know if I'm not making sense or need to clarify anything I'm trying to do. (Excel 2010 and Windows 7)

    Thanks,
    VS

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro To Copy Row Based On Boolean?

    Can you post the file? Kinda lazy to going through the code.

  3. #3
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Macro To Copy Row Based On Boolean?

    Try this out

    Please Login or Register  to view this content.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  4. #4
    Registered User
    Join Date
    03-28-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro To Copy Row Based On Boolean?

    Sorry, thought I attached it. Very new at attaching files to a forum post. Macros.xlsm

  5. #5
    Registered User
    Join Date
    03-28-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro To Copy Row Based On Boolean?

    Quote Originally Posted by DGagnon View Post
    Try this out

    Please Login or Register  to view this content.
    It works except it stops once it finds the first FALSE

  6. #6
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro To Copy Row Based On Boolean?

    I simplified your code a little bit.

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro To Copy Row Based On Boolean?

    Ignore my last post. If it stops at the first "FALSE" then

    Please Login or Register  to view this content.

  8. #8
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Macro To Copy Row Based On Boolean?

    for some reason i could not do it with out selecting cells, it may not be the most efficent, but this shoudl work for you

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-28-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro To Copy Row Based On Boolean?

    Quote Originally Posted by JieJenn View Post
    Ignore my last post. If it stops at the first "FALSE" then

    Please Login or Register  to view this content.
    It deletes the Rows with FALSE and creates a new sheet with every execution.

  10. #10
    Registered User
    Join Date
    03-28-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro To Copy Row Based On Boolean?

    DGagnon, sorry not yours. You guys are fantastic. I didn't expect this much help so fast, so thank you. I'm testing your code out right now. That was meant for JieJenn

  11. #11
    Registered User
    Join Date
    03-28-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Macro To Copy Row Based On Boolean?

    Quote Originally Posted by DGagnon View Post
    for some reason i could not do it with out selecting cells, it may not be the most efficent, but this shoudl work for you

    Please Login or Register  to view this content.
    It works great, I'll try and figure out how to do it without selecting the cells, so thanks a ton.

  12. #12
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro To Copy Row Based On Boolean?

    It was still in Advanced Filter Mode. I didn't want to override sheet2 that's all.

    Please Login or Register  to view this content.

+ 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