+ Reply to Thread
Results 1 to 11 of 11

How Sort by Largest to Smallest Column by Formula

  1. #1
    Registered User
    Join Date
    04-15-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    How Sort by Largest to Smallest Column by Formula

    hi

    Please download my file ; please see the attachment for my question ??


    regards,
    Termal
    2009,May
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How Sort by Largest to Smallest Column by Formula

    In D2 and copy down, =INDEX($A$2:$A$6, MATCH(LARGE(B$2:B6, ROWS(D$1:D2)-1), $B$2:$B$6, 0) )

    Please ask question in the body of your post rather than referring people to a workbook.

    And merging cells in Excel is terrible practice.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How Sort by Largest to Smallest Column by Formula

    See if this will do:
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How Sort by Largest to Smallest Column by Formula

    Quote Originally Posted by shg View Post
    In D2 and copy down, =INDEX($A$2:$A$6, MATCH(LARGE(B$2:B6, ROWS(D$1:D2)-1), $B$2:$B$6, 0) )

    Please ask question in the body of your post rather than referring people to a workbook.

    And merging cells in Excel is terrible practice.
    Didn't spot those duplicate values of "30" did you...hehe.

  5. #5
    Registered User
    Join Date
    04-15-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: How Sort by Largest to Smallest Column by Formula

    Thanks a lot

    Thanks Answer My Question's,
    BUT !!
    If column "Number" not ascending order

    Please see my attachment file



    regards,
    Termal
    2009,May
    Attached Files Attached Files

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How Sort by Largest to Smallest Column by Formula

    Termal,

    The others will be offline presently (US) but I confess I don't/can't see the problem -- the existing approach will still work, eg:

    C15: =RANK($B15,$B$15:$B$24)+COUNTIF($B$15:$B15,$B15)-1
    copied down

    D15: =INDEX($A$15:$A$24,MATCH(SMALL($C$15:$C$24,ROWS($B$15:$B15)),$C$15:$C$24,0))

    You can do this without using C if that's your intention but it would IMHO be ill-advised given adverse performance impact, eg:

    D15:
    =INDEX($A$15:$A$24,MATCH(LARGE($B$15:$B$24+(0.1-(ROW($B$15:$B$24)/1000)),ROWS(D$15:D15)),$B$15:$B$24+(0.1-(ROW($B$15:$B$24)/1000)),0))
    committed with CTRL + SHIFT + ENTER
    copied down

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How Sort by Largest to Smallest Column by Formula

    whats the difference betwen this question and the one posted at
    http://www.excelforum.com/excel-misc...-function.html ?
    but the same answer applies
    Attached Files Attached Files
    Last edited by martindwilson; 05-06-2009 at 08:19 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How Sort by Largest to Smallest Column by Formula

    I get the feeling you created the second chart and didn't even TRY to put the two sets of formulas from my first answer into the second example? Did you? If you don't, you'll never know for sure if you understand the formulas given.

    This sheet is the same as the first, same formula, new ranges...
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-07-2014
    Location
    Minnesota, United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How Sort by Largest to Smallest Column by Formula

    This is from a long time ago but this is the only answer which works. The next one below this original post absolutes incorrectly.

    Thank you!!

    Quote Originally Posted by shg View Post
    In D2 and copy down, =INDEX($A$2:$A$6, MATCH(LARGE(B$2:B6, ROWS(D$1:D2)-1), $B$2:$B$6, 0) )

    Please ask question in the body of your post rather than referring people to a workbook.

    And merging cells in Excel is terrible practice.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How Sort by Largest to Smallest Column by Formula

    Deliverance, welcome to the forum

    This threads is over 4 years old, I doubt anyone is still monitoring it
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  11. #11
    Registered User
    Join Date
    01-07-2014
    Location
    Minnesota, United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How Sort by Largest to Smallest Column by Formula

    Thanks, I probably won't be too active but I'm considering some excel help through twitter which would drive more forum participation as well. I just wanted to someone know how helpful this was even though its so old. Index, match, and rows are all newer to me so this problem definitely helped me to solidify their functions.

+ 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