+ Reply to Thread
Results 1 to 4 of 4

Rank function problem

  1. #1
    Registered User
    Join Date
    05-01-2008
    Posts
    46

    Rank function problem

    Hi there
    I have a problem with getting my rank function to work properly, I understand if I list all the numbers consecutively it will work, but I want my spreadsheet to look like the attached. You will see I am trying to pick up the top 5, but it misses 4 and 1.

    Any help appreciated.
    Thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Rank function problem

    You need to use commas instead of colons to avoid the 'total' lines:

    =IF(L12=0,"",IF(ISNA(RANK(L12,($L$9:$L$14,$L$17:$L$23,$L$26:$L$28,$L$31:$L$33))),"",RANK(L12,($L$9:$L$14,$L$17:$L$23,$L$26:$L$28,$L$31:$L$33))))

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

    Re: Rank function problem

    make sure you have the word "total" in the total rows on column a
    then rank from p12 down =IF(OR(A12="total",L12=0,ISNA(RANK(L12,($L$12:$L$33)))),"",RANK(L12,($L$12:$L$33))) (note if you have duplicate values the will rank = and the index match wont work later so you may need to use unique rank) now in k2 dragged down put
    =INDEX($A:$A,MATCH(SMALL($P:$P,ROW(A1)),$P:$P,0))
    Last edited by martindwilson; 04-04-2011 at 05:21 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

  4. #4
    Registered User
    Join Date
    05-01-2008
    Posts
    46

    Re: Rank function problem

    thanks! will give this a try

+ 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