+ Reply to Thread
Results 1 to 8 of 8

Sort multiple columns descendant

Hybrid View

  1. #1
    Registered User
    Join Date
    03-08-2012
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    6

    Unhappy Sort multiple columns descendant

    Hi,

    I'am looking for a function that sorts multiple columns descendant. Therefore, consider the following table:


    Table_ex_sort.jpg

    In the columngs A-C are different values. I wanna pick this values up and sort them descendant in column D, as showed in the Table (47,32,9,8,.....and so on). I think it it might be possible with a INDEX/MATCH function. Therefore, I tried the following function for cell D3 (32): =index($A$2:$C$9,MATCH(d3,$A$2:$C$9,-1),2) to search for the next smaller value than 47. But I got stuck and couldn't figure out if it's possible to solve the problem with a INDEX/MATCH combination. As a second step I wanna ignore duplicates.
    Any advice would be much appreciated.

    Thank you .

    Patrick
    Last edited by paddyfeldi; 03-08-2012 at 08:44 PM.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Sort multiple columns descendant

    Hello and welcome to the forum,

    Could you upload an excel workbook because the example is not clear in the post?
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    03-08-2012
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Sort multiple columns descendant

    Hello,

    I hope the attached picture makes things clear. Thank you.

    Patrick

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Sort multiple columns descendant

    Hi Patrick,

    For future reference, we really dislike pictures here. It means that we have to create a workbook to reflect your workbook's structure from a photo.

    Simplest answer I can think of is to use Large:

           A- B- C- D -E-- -------F-------
       1              Rank Sort descending
       2   82  1 68      1              94
       3   94 81 49      2              85
       4   37 23  2      3              82
       5   63 85 20      4              81
       6                 5              68
       7                 6              63
       8                 7              49
       9                 8              37
      10                 9              23
      11                10              20
      12                11               2
      13                12               1
           A- B- C- D -E-- ---------F---------
       1              Rank Sort descending    
       2   82  1 68      1 =LARGE(A$2:C$5,E2) 
       3   94 81 49      2 =LARGE(A$2:C$5,E3) 
       4   37 23  2      3 =LARGE(A$2:C$5,E4) 
       5   63 85 20      4 =LARGE(A$2:C$5,E5) 
       6                 5 =LARGE(A$2:C$5,E6) 
       7                 6 =LARGE(A$2:C$5,E7) 
       8                 7 =LARGE(A$2:C$5,E8) 
       9                 8 =LARGE(A$2:C$5,E9) 
      10                 9 =LARGE(A$2:C$5,E10)
      11                10 =LARGE(A$2:C$5,E11)
      12                11 =LARGE(A$2:C$5,E12)
      13                12 =LARGE(A$2:C$5,E13)

  5. #5
    Registered User
    Join Date
    03-08-2012
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Sort multiple columns descendant

    Hi,

    Sorry for the picture. Thank you for your quick answer. I already tried the large function that can sort descendant. But, how would you deal with duplicates? Is there a function to ignore duplicates?

    Thank you.

    Patrick

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Sort multiple columns descendant

    This thread shows some ideas on how to deal with Large and duplicates.

  7. #7
    Registered User
    Join Date
    03-08-2012
    Location
    Montreal
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Sort multiple columns descendant

    Hi,

    I could solve the problem by using an array formula from the thread you posted. Think I have to learn more about array formulas. They seem to be very useful.

    Thank you so much .

    Patrick

  8. #8
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Sort multiple columns descendant

    I agree, Excel becomes another more powerful program once you know how to work with arrays. They are extremely fast and allow you to do things that you never thought were possible.

    Glad it all worked out.

+ 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