+ Reply to Thread
Results 1 to 4 of 4

Move row based on second column in separate workbook

  1. #1
    Registered User
    Join Date
    05-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Move row based on second column in separate workbook

    Hi All,

    I'm pretty new to VBA so please bear with me...

    I have a workbook called Lookup.xls which has a master list of names in column A and either the words 'Accept' or 'Decline' as a status next to each name in column B. On a separate workbook (which is generated each week) is a list of names which match column A in Lookup.xls and some corresponding data in other columns. What I need to do is split the list of names into separate sheets by moving all the rows which have a name that matches 'Accept' into a sheet called 'Accept_Sheet'. The ones that are left of course will be 'Decline'.

    I've tried various code on the web but nothing that fits exactly what I'm after (and I'm not proficient enough to adapt it yet unfortunately!). Basically, I need to match the name and then move the row based on wether its got Accept in column B of Lookup.xls.

    I hope that makes sense,

    Many thanks for any help you can give!

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Move row based on second column in separate workbook

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-22-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Move row based on second column in separate workbook

    John, thanks so much for the very speedy response!

    Your suggestions was fantastic - I would never have thought of doing it that way, brilliant! I decided to use Autofilter instead of looping for the copy part as I had a few issues with some rows getting stuck on a valid 'Accept', but otherwise the code worked perfectly!

    Much appreciated again, cheers!

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Move row based on second column in separate workbook

    You're welcome. Glad to help out, and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ 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