+ Reply to Thread
Results 1 to 9 of 9

copy row to other sheets depending on cell value (multiple values!)

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    copy row to other sheets depending on cell value (multiple values!)

    Hi,

    I have a worksheet with raw data and now would need to go through every single row to check if column I is holding a specific number, and if yes, copy it to another sheet. totally there are several options where I need to copy to.

    Cell value - sheet name
    2660 - Blue
    2200 - Cafe
    2230 - Marcos
    2290 - Vbar

    So basically, if column I cell content is 2230, then copy the entirerow to sheet marcos. if value is 2290 then copy to vbar, if 2660 copy to blue, etc.
    I did find several samples via google where this topic is explained, but the problem is that I have around 5000 rows of data and dont want to loop through the entire data 4 times to check one by one if there is a match...

    Any suggestions are welcome!
    Thanks,
    A2k

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy row to other sheets depending on cell value (multiple values!)

    Please attach a sample and will write you a faster code.

  3. #3
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: copy row to other sheets depending on cell value (multiple values!)

    My current very simple attemp for your reference.

    Please Login or Register  to view this content.
    Thanks,
    A2k

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy row to other sheets depending on cell value (multiple values!)

    You can shorten it

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: copy row to other sheets depending on cell value (multiple values!)

    hmm... well, why not, its something

    I guess there is absolutely no way for me to have an elegant solution like

    Please Login or Register  to view this content.
    bummer.
    But thanks a lot for the help.
    A2k

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy row to other sheets depending on cell value (multiple values!)

    Of course you can have; I did not notice that you are copying in to the same sheet.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: copy row to other sheets depending on cell value (multiple values!)

    Madly in love with you AB33,
    thanks a lot
    A2k

  8. #8
    Registered User
    Join Date
    11-03-2010
    Location
    calgary, ab
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: copy row to other sheets depending on cell value (multiple values!)

    i have a similar question but this time i need to copy a range instead of specific value
    i have a workbook with 2 worksheet "24hrData" and "PitSession". I just need to get the 0900-1430 (pit session) of the "24hrData" worksheet and transfer to "PitSession" worksheet
    I could use the code above and write for every time but i need a more efficient way to do it
    Please Login or Register  to view this content.
    can someone help me on this?
    Last edited by congokin; 10-25-2013 at 07:11 PM.

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy row to other sheets depending on cell value (multiple values!)

    congokin,
    You need to start your own thread. Please read forum rules.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sorting data from a master sheet to multiple sheets depending on values in a given column
    By kodos10 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-30-2013, 05:46 AM
  2. Replies: 1
    Last Post: 05-15-2013, 09:51 PM
  3. Creating multiple sheets depending a cell count
    By burlywood66 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-02-2010, 05:25 PM
  4. Copy a range to different sheets depending on first cell contents
    By WaveOfMutilation in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 03-01-2010, 12:58 PM
  5. Replies: 1
    Last Post: 02-20-2009, 11:15 AM

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