+ Reply to Thread
Results 1 to 6 of 6

Copying rows to new sheet based on condition

  1. #1
    Registered User
    Join Date
    10-17-2009
    Location
    Tucson AZ
    MS-Off Ver
    Excel 2003
    Posts
    4

    Unhappy Copying rows to new sheet based on condition

    Hello, I need help! I have a "master schedule" that I update daily with new work orders. Im trying to figure out how to set it up so that all of the rows in the master schedule (sheet1) that have an "X" marked in column G will automatically copy into a seperate schedule in sheet2 and all rows that have an X in column H will automatically copy into a seperate schedule in sheet3. Any ideas? I can't figure it out! Thank You!
    Attached Files Attached Files
    Last edited by nraz76; 10-17-2009 at 03:14 AM. Reason: Added Sample

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

    Re: Need help copying rows into a new sheet based on condition

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.


    Also please clarify if Sheet1 is new each day and thus rows are to be added to existing data or if it's a simple repeat process.

  3. #3
    Valued Forum Contributor jj72uk's Avatar
    Join Date
    03-22-2008
    Location
    Essex, England
    MS-Off Ver
    Work - Office 2000, Home - Office 2007E
    Posts
    360

    Re: Need help copying rows into a new sheet based on condition

    One way of doing it is by having a macro written in VBA and link to lets say a control button.

    This code was orginally written by Barrie Davidson, but modified for your requirements.

    Please Login or Register  to view this content.
    You can modify it and create another control button for the H column.

    As always, make a backup before trying anything new.


    EDIT:

    OK, just re read it and you wanted them in a new sheet same workbook, not new workbook.

    So..

    Please Login or Register  to view this content.
    Last edited by jj72uk; 10-17-2009 at 02:33 AM.

  4. #4
    Registered User
    Join Date
    10-17-2009
    Location
    Tucson AZ
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Need help copying rows into a new sheet based on condition

    Thank You! Im going to try that now. I also just attached sample. The master schedule is updated several times a day to reflect status of new and exsisting orders. Each process (labled in columns F-K) needs a seperate schedule listing only the orders pertaining to them.

  5. #5
    Registered User
    Join Date
    10-17-2009
    Location
    Tucson AZ
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Need help copying rows into a new sheet based on condition

    I ran the script, but it added drop down to the columns in header row. I can sort/filter by column on master page, but it is not copying to sheet 2. Maybe I did it wrong?

  6. #6
    Valued Forum Contributor jj72uk's Avatar
    Join Date
    03-22-2008
    Location
    Essex, England
    MS-Off Ver
    Work - Office 2000, Home - Office 2007E
    Posts
    360

    Re: Need help copying rows into a new sheet based on condition

    What exactly happend?

    It will apply drop downs in the main sheet.

    Bascially what the code does is automatically apply the auto filter, showing only 'x's in the g coloum, once it does this to copy the sheet and paste it into a new sheet.

+ 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