+ Reply to Thread
Results 1 to 9 of 9

Excel Rank Function not working properly due to weird cell values

  1. #1
    Forum Contributor
    Join Date
    06-01-2014
    Location
    Riyadh, Saudi Arabia
    MS-Off Ver
    Microsoft 365
    Posts
    224

    Question Excel Rank Function not working properly due to weird cell values

    Hi All,

    I have a weird situation in Excel Rank.

    Please see attached file and rows highlighted, they have value 8.5 in the cells.

    But one ranks as 102 & the other as 101. If I manually type 8.5 in these cells then the rank works alright.

    Can anyone tell me if there is anything hidden inside these numbers which we don't see ?

    BR,
    Attached Files Attached Files
    Last edited by ibuhary; 07-26-2021 at 03:41 AM. Reason: Title Change

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,597

    Re: Rank Issue

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, in detail.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    06-01-2014
    Location
    Riyadh, Saudi Arabia
    MS-Off Ver
    Microsoft 365
    Posts
    224

    Re: Rank Issue

    Done
    Thank you.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,597

    Re: Excel Rank Function not working properly due to weird cell values

    That's better.

  5. #5
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Excel Rank Function not working properly due to weird cell values

    Because this information was imported elsewhere, it may have a non-printable character. Select column "A", go to Data>Text to columns and press Finish directly without any other actions
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,877

    Re: Excel Rank Function not working properly due to weird cell values

    It looks like standard floating point error. I put something like =(A100-8.5) into a convenient cell, format as scientific, and copied down to cover the suspect cells. I see that the value in A102 is slightly smaller than the value in A106 -- to the tune of about 3E-15. The RANK() function sees that slight difference which is reflected in the output.

    Solutions vary, and can depend on the strategy you want to use to deal with floating point errors. In Excel, the usual first recommendation is to incorporate a ROUND() function in the sequence. Maybe something like RANK(ROUND(A2,n),...) Where n is a number indicating your expected precision.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,711

    Re: Excel Rank Function not working properly due to weird cell values

    Not entirely sure why you think this is wrong. I've made the data into a Table and sorted the numbers into descending order. I've added various comparisons. Looks right to me.
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,711

    Re: Excel Rank Function not working properly due to weird cell values

    Ah, now what is weird is that I can change a number to the same value as that below it and the ranking doesn’t change. But if I re-enter the number below they get the same rank.

    Maybe the character set? What's the source of the data?

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,711

    Re: Excel Rank Function not working properly due to weird cell values

    Selecting the whole range of numbers and using Text to Columns with no separators also seems to work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Issue with Rank Formula
    By iowagrad2003 in forum Excel General
    Replies: 9
    Last Post: 10-05-2018, 08:23 AM
  2. [SOLVED] Rank Number Issue
    By ScabbyDog in forum Excel General
    Replies: 1
    Last Post: 05-10-2016, 07:14 AM
  3. [SOLVED] VLookup issue when using RANK and a Tie occurs
    By ehatz in forum Excel General
    Replies: 3
    Last Post: 08-31-2015, 04:00 PM
  4. [SOLVED] Issue with Rank Count Formula
    By Doofus1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-16-2014, 03:47 PM
  5. [SOLVED] Rank and Vlookup N/A issue
    By swarv in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2014, 05:29 AM
  6. [SOLVED] Having an issue with a formula used to rank column numbers earlier but now is failing .
    By Securitysports in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-02-2013, 06:04 PM
  7. Rank Excel File Identical Dollar Amount Issue
    By zanderwebb in forum Excel General
    Replies: 14
    Last Post: 09-26-2013, 08:10 AM

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