+ Reply to Thread
Results 1 to 9 of 9

Ranking closest to 100

  1. #1
    Registered User
    Join Date
    04-15-2011
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Ranking closest to 100

    I need to rank a bunch of cells - closest to 100 radiating outward both above and below 100. With the data below, A12 should be rank 1, A9 should be rank 2, A6 should be rank 3, etc. I am familiar with the RANK function but I can't figure out how to set the value of 100 as the baseline where rank 1 would start. Thanks for your help!

    A1-A15
    86.19
    88.36
    90.41
    85.94
    97.26
    100.75
    89.91
    97.06
    99.45
    104.07
    106.59
    99.89
    95.45
    105.2
    103.89

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,712

    Re: Ranking closest to 100

    Look at the attached. Does that work for you?

    Alan
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-15-2011
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Ranking closest to 100

    That is perfect! Thank you so much!

  4. #4
    Registered User
    Join Date
    04-15-2011
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Ranking closest to 100

    Follow up question:

    What if I wanted to keep the same data, but I want the results to rank closest to 100 without going over. This would give me a 1 through 11 rank, and then take the cells that went over 100 and rank them 12-15. 12 being closest to 100 from the >100 side of the scale.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,712

    Re: Ranking closest to 100

    A little bit of extra work for that. Here is an example.

    Alan
    Attached Files Attached Files
    Last edited by alansidman; 04-15-2011 at 06:54 PM.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: Ranking closest to 100

    You could use a single formula, i.e. in row 3 copied down

    =IF(A3<=100,COUNTIFS(A$3:A$17,"<=100",A$3:A$17,">"&A3)+1,RANK(A3,A$3:A$17,1))
    Audere est facere

  7. #7
    Registered User
    Join Date
    04-15-2011
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Ranking closest to 100

    @daddylonglegs

    That is amazing you got it into a single formula. I've been trying to read through it and learn how it was constructed.

    Here is how I see it:

    The IF fail is easy... If A3 isn't less than or equal to 100, rank within the range normally. This would give the cells that went over 100 the highest ranks as needed.

    If the IF is true... Count within the range how many cells are less than or equal to 100 (that would give me 10), then count within the range (and this is where im stuck) how many cells are greater than ??? as well as A3? What exactly does A$3:A$17,">"&A3) mean?

    Does the first count of 10 provide the formula with the range of rankings? (1-10)

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Ranking closest to 100

    COUNTIFS look BOTH criterias where:

    A$3:A$17 is less or equal than 100

    AND

    A$3:A$17 greater then A3
    Never use Merged Cells in Excel

  9. #9
    Registered User
    Join Date
    04-15-2011
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Ranking closest to 100

    That makes sense, thank you!

+ 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