+ Reply to Thread
Results 1 to 9 of 9

Complex? sorting

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Complex? sorting

    Hi guys,

    I'm trying to sort my data in Excel 2010. I need to convert a set of data in rows (sheet 1) to 7 different groups on sheet 2. The sorting is based om string data in colom K (represented here by numbers for ease).
    Group1 gets all rows with value 1 in colom K; Group2 gets all rows with value 2 in colom K; etc

    Sheet 1
    A (B-J) K
    1 text1 (bunch of other cells) 1,4
    2 text2 (bunch of other cells) 2,3
    3 text3 (bunch of other cells) 1,2
    4 text4 (bunch of other cells) 1,7
    5 text5 (bunch of other cells) 0

    Sheet 2
    A B C D etc
    Group1 Group2
    1 text1 1,4 text2 2,3
    2 text3 1,2 text3 1,2
    3 text4 1,7

    My question for you: what is the best method to do this sorting? I did some searching on the web, but most methods I found are for more 'simpeler 'sorting actions. Should I use pivot tables, VBA or 'cell formulas'?
    Who can point me in the right direction?

    Thanks!

    Schzuki

    P.S. As you might have guessed I'm kind of new to this, all help is welcome!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Complex? sorting

    Please attach a sample workbook with expected output for better understanding

    Refer my signature area to know how to attach file


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Complex? sorting

    There goes the layout, see attachement for the proper layout
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Complex? sorting

    You're quick Sixtsense!
    Was working on that already

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Complex? sorting

    Please show what is your input and expected output clearly which gives more clarity to us.

  6. #6
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Complex? sorting

    Okay, here goes

    The data (in sheet 'Data') has to be sorted in sheet ('output')
    The input data is presented in rows (each row contains 1 data entry)

    Each row has to be sorted according to all categories (cat1; cat2 etc.) mentioned in colom H ('Categories').

    E.G:
    Substance /~/ Categories
    Substance2 /~/ cat1,cat2 -->goes in both cat1 and cat 2

    Finally, you schould end up with a sheet that shows each substance and its categories in its appropriate colom.
    I've added a file that shows the input and the result. Hope it helps!
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Complex? sorting

    Try the attached
    Attached Files Attached Files

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Complex? sorting

    Hi Schzuki,
    try it
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Complex? sorting

    Thanks guys! As far as I can tell so far, this seems to do the trick. Couldn't have done this myself!

    @Nilem: If it isn't too much trouble, could you please explain which part of your code performs what action? (I do get the general idea, but I would like to understand it exactly)

+ 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