+ Reply to Thread
Results 1 to 12 of 12

Copy certain cells based on true value

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    FL
    MS-Off Ver
    Excel 2010
    Posts
    14

    Copy certain cells based on true value

    Hello everyone,

    I have been searching around for the last several hours and haven't specifically been able to find something that would help me.

    I have a check box that when checked provides a true false value, so Column A is the Check box, Column B is the True/False value.

    I have data in Columns C:L, what I would like to do is copy the row of data if the value is true and have it loop through all true values in Column B, and copy it in another sheet. The kicker is I need the ability to exclude certain columns in the process for example copy the row from c:l but exclude column J for example. I am not even sure where to get started on this one.

    I would run this process from a control button and would over write the data in the new sheet. Any help is appreciated.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Copy certain cells based on true value

    Hi

    Is there a header row?

    rylo

  3. #3
    Registered User
    Join Date
    06-19-2012
    Location
    FL
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Copy certain cells based on true value

    Yes there is in row 8
    Last edited by travler75; 06-19-2012 at 11:45 PM.

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Copy certain cells based on true value

    Hi

    Rather than a loop, why don't you use the advanced filter to move the data. Either do it manually, or macro to run it across?

    rylo

  5. #5
    Registered User
    Join Date
    06-19-2012
    Location
    FL
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Copy certain cells based on true value

    The filter option wont work because I need it in a different sheet not linked to anything. The macro is the part I need help with. The data is very dynamic which is why I considered the loop based on the T/F field.

    This is what I came up with and failed miserably

    Please Login or Register  to view this content.
    Last edited by travler75; 06-20-2012 at 06:16 PM. Reason: adding code

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Copy certain cells based on true value

    Hi

    You can use a filter to transfer to another sheet. How about you set up an example file for us to review so we have your format etc.

    rylo

  7. #7
    Registered User
    Join Date
    06-19-2012
    Location
    FL
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Copy certain cells based on true value

    Temp 061912 v4 testvb.xlsm

    Here is an example Rylo, I appreciate you looking at it.

  8. #8
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Copy certain cells based on true value

    Hi

    Have a look at the attached. Hopefully it will give you an idea of what I mean.

    839515.xlsm

    rylo

  9. #9
    Registered User
    Join Date
    06-19-2012
    Location
    FL
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Copy certain cells based on true value

    I am not sure what you did here. The file errors and says needs to be repaired when I open it. Something about an external link. I see the h# in sheet one, is it supposed to pull over the when the value of h2=true? not sure I understand how to get there. Thanks

    Edited:I got the problem resolved, I think I understand what you are talking about with filtering. If I wanted to apply formatting would that cause any issues?

    Thanks
    Last edited by travler75; 06-20-2012 at 11:38 PM.

  10. #10
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Copy certain cells based on true value

    Hi

    OK, don't know what went wrong there. I'll have another go.



    rylo
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    06-19-2012
    Location
    FL
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Copy certain cells based on true value

    Rylo Not sure if you saw my edit, I got it working. Had something screwy going on with my PC. am I right to assume that if I wanted to keep each section separate for formating purposes I would just duplicate the code and adjust the ranges etc?

    I really appreciate your help on this.

  12. #12
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Copy certain cells based on true value

    Hi

    Sure. Depends on where you want the output whether you do the thing 3 times, or put things into a loop and use variables. You could build the output headers and the criteria details with the code as well. But it really does depend on where you want to put things.

    rylo

+ 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