+ Reply to Thread
Results 1 to 7 of 7

Rank based on two Criteria

  1. #1
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Post Rank based on two Criteria

    I have created a sheet based on different formulas from Cell B3:AY8. The output of these calculations is displayed in range BA4:BG8. (sheet attached)

    Now I want that the output as appeared in Range BA4:BG8 should be automatically Ranked based on Points & then on NRR. Means, in case two teams have equal points then the one with better NRR gets better Rank and Output range sorted accordingly in descending order.
    Attached Files Attached Files
    Last edited by leo73pk; 06-28-2010 at 11:34 AM.

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

    Re: Rank based on two Criteria

    not sure whether + or - nrr is best do for tie break on +ve best based on cols BF/BG

    =RANK(BF5,$BF$5:$BF$8)+SUMPRODUCT(--(BF5=$BF$5:$BF$8),--(BG5<$BG$5:$BG$8))
    or for -nrr best
    =RANK(BF5,$BF$5:$BF$8)+SUMPRODUCT(--(BF5=$BF$5:$BF$8),--(-1*BG5<$BG$5:$BG$8*-1))
    have a look at this i did the ranking in colAZ based on +ve best then changed your table slightly
    =RANK(AX5,$AX$5:$AX$8)+SUMPRODUCT(--(AX5=$AX$5:$AX$8),--(AY5<$AY$5:$AY$8))
    and
    =INDEX($AM$5:$AM$8,MATCH(ROW(A1),$AZ$5:$AZ$8,0),1)
    Attached Files Attached Files
    Last edited by martindwilson; 06-28-2010 at 03:02 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

  3. #3
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Re: Rank based on two Criteria

    Martin,

    Since +NRR is better, therefore your formula is fine and its works as well and ill get back to further extend it on the sheet. As regard syntax of your formula is concern i'll appreciate if you could explain that you use -- sign what does that mean


    not sure whether + or - nrr is best do for tie break on +ve best based on cols BF/BG

    =RANK(BF5,$BF$5:$BF$8)+SUMPRODUCT(--(BF5=$BF$5:$BF$8),--(BG5<$BG$5:$BG$8))
    or for -nrr best
    =RANK(BF5,$BF$5:$BF$8)+SUMPRODUCT(--(BF5=$BF$5:$BF$8),--(-1*BG5<$BG$5:$BG$8*-1))
    have a look at this i did the ranking in colAZ based on +ve best then changed your table slightly
    =RANK(AX5,$AX$5:$AX$8)+SUMPRODUCT(--(AX5=$AX$5:$AX$8),--(AY5<$AY$5:$AY$8))
    and
    =INDEX($AM$5:$AM$8,MATCH(ROW(A1),$AZ$5:$AZ$8,0),1)

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

    Re: Rank based on two Criteria

    -- changes true/false to 1/0 so calculations can be done on the results
    see
    http://www.mcgimpsey.com/excel/formulae/doubleneg.html

  5. #5
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Re: Rank based on two Criteria

    Martin

    Thanks for your prompt response. One more thing i would like to ask in the index formulae you used a (Match(ROW(A1), While A1 is a blank cell. why this particular reference cell is used (first cell of a sheet).

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

    Re: Rank based on two Criteria

    row(a1)=1or even row( z1)=1 so that just generates 1
    so dragged down becomes row(a2) =2
    just saves having to increment 1,2,3,4 manually

  7. #7
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Re: Rank based on two Criteria

    Thanks martin. the formula proposed by you works fine.

+ 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