+ Reply to Thread
Results 1 to 8 of 8

Multiple Ranking Criteria

  1. #1
    Registered User
    Join Date
    08-06-2006
    Posts
    36

    Multiple Ranking Criteria

    I am trying to rank a list of names based off of more than one column. I would like to rank the list of names down column B based on column D AND F. Can this be done?

    Thank you!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Do you mean that the ranking should be based on column D with F as tie-break or do you want to rank on the sum of D and F or something else?

  3. #3
    Registered User
    Join Date
    08-06-2006
    Posts
    36
    My bad, I should have been a little more clear. I do want to rank it based on D and then F as the tie breaker. Sorry about that.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    OK assuming that highest is ranked 1 then this should do what you want in row 1 copied down, extend ranges as necessary

    =RANK(D1,$D$1:$D$10)+SUMPRODUCT(--($D$1:$D$10=D1),--($F$1:$F$10>F1))

  5. #5
    Registered User
    Join Date
    08-06-2006
    Posts
    36
    you are awesome!

  6. #6
    Registered User
    Join Date
    06-13-2007
    Location
    Columbus, OH
    Posts
    2

    Question about sumproduct formula

    Hi Daddylonglegs,

    I like your solution. I gave it a try here at work. I was wondering, though, what does the "--" designate in front of each range in the sumproduct portion of the formula?

    Thanks!
    Angie M.

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    This part of the formula

    $D$1:$D$10=D1

    returns an array of TRUE/FALSE values but to count these they need to be converted to 1/0 values - that's what -- does. I could have used +0 or *1 to do the same, essentially any mathematical operation that doesn't change the value.

    Another alternative syntax is

    =SUMPRODUCT(($D$1:$D$10=D1)*($F$1:$F$10>F1))

    see this link for more

    http://www.xldynamic.com/source/xld....CT.html#format

  8. #8
    Registered User
    Join Date
    06-13-2007
    Location
    Columbus, OH
    Posts
    2
    Thank you!

+ 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