+ Reply to Thread
Results 1 to 4 of 4

Move data to specific worksheet based on Column A criteria.

  1. #1
    Registered User
    Join Date
    06-05-2013
    Location
    Oregon
    MS-Off Ver
    Excel 2003
    Posts
    3

    Move data to specific worksheet based on Column A criteria.

    Hello all, forestminuet here and I'm new to these forums! (Although I've been lurking for a while now ) I have kind of a complex question I was wondering you might be able to help me with.

    Listed in column A in the master sheet are departments that are housed in our 4 buildings here at the plant I work at. (Buildings are titled: CSMT, DH, DOORS, SPECIALS.) What I want to do is automatically move the row of data based on the department I type in column A.

    Example: If I type Wood SDL in a cell in column A, it will move the entire row to the CSMT worksheet.

    I know this might pose a problem as most solutions I have read, the worksheet has to be named after what's typed in column A. So if there is no way this can be done, please let me know. I am just trying to find a way to avoid typing the project in the master then manually copy and pasting it into the separate building's worksheet.

    I have attached a file for reference (I apologize if I did not attach properly. I think it's okay though). If you need more clarification please let me know. Thank you in advance for your help!

    Cheers!
    forestminuet

    FYI, I know little to no VBA so I will try my best to understand.

    Master Improvement project list.xls

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Move data to specific worksheet based on Column A criteria.

    Give this a try and see how close i got. You are going to want to make sure everything listed on the master sheet is listed in code. Just in case I forgot one. I put code it there to let you know if it finds one.

    Please Login or Register  to view this content.
    *Important!!
    EDIT: I adjusted the code because there were some issues with leading and tailing spaces in the values within the master sheet. I also changed the way it operated to hopefully speed it up. I put in another layer of messaging to let you know if it is not able to properly place an item. Lastly, the "Glazing Bead Sawyers" in cell A38 is gumming up somewhere and I don't know where.
    Last edited by stnkynts; 06-07-2013 at 11:07 AM.

  3. #3
    Registered User
    Join Date
    06-05-2013
    Location
    Oregon
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Move data to specific worksheet based on Column A criteria.

    Thanks stnkynts. I'll try this tomorrow at work and see if I can give it a go. So just to clarify, on the master sheet, I right click on the tab then go to "view code" and paste this into the visual basic module, correct?

  4. #4
    Registered User
    Join Date
    06-05-2013
    Location
    Oregon
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Move data to specific worksheet based on Column A criteria.

    Thank you! I'm not sure what you mean by "everything on the master sheet is listed in code." As I said in my first post, I know almost nothing about VBA (but I'm slowly learning ) If you can give me a website to check on how to do it or let me know how it would be very appreciated.

    I'm excited to see how this code works. Thanks a lot for working that up.

+ 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