+ Reply to Thread
Results 1 to 7 of 7

RANK Function : excluding subtotals from the Range

  1. #1
    Registered User
    Join Date
    04-03-2013
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    RANK Function : excluding subtotals from the Range

    Hey Guys,

    This is my first post on the forum, after spending all day on here I am excited to learn from the community.

    I need to build a simple Rank function on Excel. The only issue is that I cannot get the function to work properly because there are subtotals amongst the range, and using Excel on Mac, I can't figure out how to get to make it work.

    It is the exact same problem that was posted in another thread, but I couldn't get the solution to work:

    http://www.excelforum.com/excel-form...a-to-rank.html

    Carrots 34
    Celery 11
    Peppers 28
    Onions 15
    Garlic 20
    Tomatoes 11
    Lettuce 11

    130

    Chicken 62
    Beef 20
    Shrimp 5

    87

    In Windows, they talk about the use of 'RankRng' function to solve this problem, but I don't have this formula on my Mac.

    Any ideas?!

    Thanx

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: RANK Function : excluding subtotals from the Range

    HI Johnny,

    welcome to the forum.
    I don't have any idea of Mac, but if you know that rankrng function can help you, then I believe that should / or some equivalent function in mac, should work for you.




    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: RANK Function : excluding subtotals from the Range

    rankrng is not an excel function-it must be provided by an add-in or through vba in a workbook. where was it mentioned?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    04-03-2013
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: RANK Function : excluding subtotals from the Range

    Thanks for the responses guys.

    Dilipandey, I would love to be able to have the equivalent of RankRng on the Mac but I have not been able to find anything.

    JosephP, thanks for telling me this, I was wondering why I couldn't see the formula on either the Mac or PC Excel (I have access to the PC version as well, but I work on a Mac primarily). I found this solution on another forum where someone posed the same question:

    http://www.justanswer.com/computer-p...-5-bottom.html

    It was also mentioned in a more recent post that goes into details about the Rank function:

    http://www.tushar-mehta.com/excel/newsgroups/ranking/

    If this needs to be installed as an add-in or through a vba do you know how I would get this (for either Mac or PC)?

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: RANK Function : excluding subtotals from the Range

    Assuming the list of items in Column B and the numbers in C

    This will rank all items except a blank in cell B for thesub total- assuming the sub total is blank
    =IF(B2="","",SUMPRODUCT(1-($B$2:$B$17=""),--(C2 < $C$2:$C$17))+1)

    So what is actually in column for the subtotal ?

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: RANK Function : excluding subtotals from the Range

    the tushar mehta link shows that rankrng is actually a named range and demonstrates how to define it ;-)

  7. #7
    Registered User
    Join Date
    04-03-2013
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: RANK Function : excluding subtotals from the Range

    Sorry for my delayed response, I didn't receive an email when new answers were added and am just returning to this now.

    etaf, your solution worked!!! Unbelievable thank you ...

    =IF(B2="","",SUMPRODUCT(1-($B$2:$B$17=""),--(C2 < $C$2:$C$17))+1)

    JosephP, I was still unable to get the formula to work properly after defining the range, thanks for helping though.

    Do I need to add a 'SOLVED' to the forum post now?

  8. #8
    Registered User
    Join Date
    04-03-2013
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: RANK Function : excluding subtotals from the Range

    One quick addendum before this case is closed.

    This solution worked perfectly for the given scenario. If, however, I change the numbers in Column C to percentages (to rank growth rates), the formula doesn't work. Any quick ideas why this would be?

+ 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