+ Reply to Thread
Results 1 to 6 of 6

Ranking Numbers on how close to zero

  1. #1
    Registered User
    Join Date
    12-12-2003
    Posts
    79

    Ranking Numbers on how close to zero

    i know how to rank a list of numbers but i want it so it ranks it on how close to zero they are

    ie

    -1.42
    0.10
    0.58
    0.76

    i want it so rank 1 is 0.10 , if i just use the normal ranking method it makes -1.42 ranked 1 as that is the first number


    many thanks for any helo

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Ranking Numbers on how close to zero

    With
    A1:A10 containing numeric values and NO blank cells range...

    This formula calculates the rank:
    (edited to simplify the formula by eliminating the numeric test section)
    Please Login or Register  to view this content.
    Otherwise, if there ARE blanks (or text cells) they will be ignored if you...
    use this ARRAY FORMULA, committed with CTRL+SHIFT+ENTER
    (instead of just ENTER)
    Please Login or Register  to view this content.
    Copy either formula down through B10

    Does that help?
    Last edited by Ron Coderre; 07-23-2008 at 11:15 AM.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Add a helper column that takes the absolute value of your originals and then rank those..

    so if your original data is in A1:A4, then in B1, copied down... =ABS(A1)

    then in C1, copied down: =Rank(B1,$B$1:$B$4,1)
    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
    12-12-2003
    Posts
    79
    thanks for your help , they do work except sometimes there will be a minus number in the list that is closer to zero than some of the other numbers

    ie the list of numbers may be

    -0.9
    0.5
    0.78

    so in that example -0.9 is the closest to zero , using the formulas above it actually makes that the outsider of the 3 because i think its making it +0.92

    altho i could be making a simple error somewhere

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I don't understand how -0.9 is closer to 0 than 0.5 or 0.78 when you say that

    If I look at a number line... it is further from 0.

  6. #6
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    ah yeah sorry my mistake,, was getting confused on my sheet,, think ive sorted it now

    many thanks !!!

+ 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