+ Reply to Thread
Results 1 to 6 of 6

Macro to move rows, row by row, based upon specific criteria.

  1. #1
    Registered User
    Join Date
    02-01-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    8

    Macro to move rows, row by row, based upon specific criteria.

    Macro to move rows, row by row, from one worksheet to another worksheet based upon specific criteria.

    I need a macro that I can apply (to a rectangle click) to match and move rows from one work sheet to the corresponding row in another worksheet.

    Conditions:
    -Column A "Location" = Values are Unique
    -All other Columns = Values are NOT unique
    -A list of Contents is added to the worksheet "PullSheet"
    -The "Get Pull Sheet" rectangle is clicked

    1. The first, only the first, matching contents row in the worksheet "MasterLog" is moved (copied and then deleted, so it cannot be pulled again, from "MasterLog") to the corresponding row in worksheet "PullSheet".
    2. If the MasterLog's "On Hold" column's value is "True", it does not recognize this row as an option to be moved to PullSheet.
    3. Then goes row by row (Item by Item) doing the same thing.

    The top 3 criteria are very important to me. If it is possible the next 2 would be very helpful as well, but not necessary.

    4. If the Contents row in "PullSheet" does not have a match in "MasterLog" it should be highlighted Red.
    5. If the Contents Row in "PullSheet" matches a (Location) that is a "Z?????" it should be highlighted Green after being moved to "PullSheet"

    I have attached a sample workbook to see more clearly what I am referring to. Thank You All.
    Attached Files Attached Files
    Last edited by luke8182; 02-20-2012 at 10:20 PM. Reason: SOLVED

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Macro to move rows, row by row, based upon specific criteria.

    luke8182,

    Welcome to the forum.
    Would it be possible for you repost the workbook with an after code example. In your current workbook you have several "Contents" listed multiple times.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  3. #3
    Registered User
    Join Date
    02-01-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro to move rows, row by row, based upon specific criteria.

    Thanks for your quick reply. I am semi-versed in macros and I know this one may be a bit of a challenge.

    Here is another workbook with the first two lines of the PullList filled in. The idea behind the workbook is that there are several of the same items in different locations, and locations are not item specific. When an order comes though, I need to create a pull list that pulls those items out of the MasterLog and onto the PullList. Then they can be located and pulled. I run into problems with a macro because it seems to try and pull an item out of the same location for each time it is on the PullList.

    Thanks again.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Macro to move rows, row by row, based upon specific criteria.

    Hi,

    Just looked at your new book. And I'm still not sure about it. If you are "Pulling" "A3343I". In your example you show the "Location" as "A0112", but when you look at the "Master sheet for "A0112"
    It has "A4456P" as it's content. Is this correct?

  5. #5
    Registered User
    Join Date
    02-01-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Macro to move rows, row by row, based upon specific criteria.

    Sorry for the confusion Charles,

    A0212 has the contents code A4456P. A0112 should not be appearing on the MasterLog. The location numbers should not appear on the MasterLog unless they have a package. The numbers in the location column, although similar, will not ever be the same as the numbers in the contents column either. Each number in the location column refers to a shelf. The ZA numbers in the location column are at a different warehouse. Each number in the package column refers to a specific shipment ID. Each number in the contents column is the actual item on that shelf. This is just a small sample of coded material that's about 15,000 items.

    I've attached an easier to understand book. It has the locations the same, but I condensed the other numbers into a much easier to understand format.

    Thanks again for your patience.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Macro to move rows, row by row, based upon specific criteria.

    luke8182,

    Check to see if this is what you want. If not let me know what I missed
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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