+ Reply to Thread
Results 1 to 3 of 3

Need Macro to Move 2nd Duplicate Product to Sheet2

  1. #1
    Registered User
    Join Date
    11-20-2012
    Location
    Oklahoma, US
    MS-Off Ver
    Excel 2010
    Posts
    1

    Need Macro to Move 2nd Duplicate Product to Sheet2

    I have a spreadsheet with 2 columns. Column A being the product number and Column B being a checkin/checkout time. How do I move a product's checkout time to sheet2? Example below:

    Currently Sheet1
    Product..... Time
    0001........ 20121119081512 (Checkin)
    0002........ 20121119081530 (Checkin)
    0003........ 20121119081602 (Checkin)
    0004........ 20121119081645 (Checkin)
    0005........ 20121119081708 (Checkin)
    0001........ 20121119081600 (Checkout)
    0002........ 20121119082001 (Checkout)


    After Macro:
    Sheet1 (Product Check In):
    0001........ 20121119081512
    0002........ 20121119081530
    0003........ 20121119081602
    0004........ 20121119081645
    0005........ 20121119081708

    Sheet2 (Product Check Out):
    0001........ 20121119081600
    0002........ 20121119082001

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

    Re: Need Macro to Move 2nd Duplicate Product to Sheet2

    Hi

    Are all the items going to be beautifully organised like your example where all the check outs will be at the end of all the checkins, or are you going to have checkins and checkouts scattered through out the range? If so, then when an item is moved to Sheet2, what do you want to do with the resulting blank cells? Delete just the 2 cells, or the entire row?

    rylo

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need Macro to Move 2nd Duplicate Product to Sheet2

    Here's a little trick that I got from Alphafrog on a recent post - try it:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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