+ Reply to Thread
Results 1 to 5 of 5

Ranking

  1. #1
    Registered User
    Join Date
    08-06-2011
    Location
    kano,Nigeria
    MS-Off Ver
    Excel 2007, 2010 ,2013
    Posts
    32

    Question Ranking

    please can some one help me with a rank formula if have data like 5,8,9,1,3,0 from column A1 to A6.i want the rank to appear in B1 then i Will autofill the rest but the ranks should be in this format (1st,2nd,3rd.....) not 123... and if a cell is empty,its rank should be excluded and appears empty too.help me with a formula pls.thanks in advance
    Last edited by ENEMALI; 08-07-2011 at 12:29 PM.

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

    Re: Ranking

    For this to work, move the values down to start at A2, put "Score" in A1. Put "Rank" in B1, then this formula in B2, copied down:

    =IF($A2=0, "", RANK($A2,$A$2:$A$100)&MID("thstndrdth", MIN(9, 2 * RIGHT(RANK(A2,$A$2:$A$100))*(MOD(RANK(A2,$A$2:$A$100)-11, 100) > 2) + 1), 2))
    Last edited by JBeaucaire; 08-06-2011 at 11:49 PM.
    _________________
    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!)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Ranking

    Do you mean, in B1:

    Please Login or Register  to view this content.
    copied down?

    The above will repeat rank if duplicate value found...

    If you don't want repeat:

    Please Login or Register  to view this content.
    to avoid repeated calculations, you can use a helper column with just:

    Please Login or Register  to view this content.
    in it

    then in next column:
    Please Login or Register  to view this content.
    adds the endings.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    08-06-2011
    Location
    kano,Nigeria
    MS-Off Ver
    Excel 2007, 2010 ,2013
    Posts
    32

    Smile Re: Ranking

    thanks alot JB and NBVC the formula works perfectly..... keep on your good work
    Last edited by ENEMALI; 08-08-2011 at 12:09 AM.

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

    Re: Ranking

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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