+ Reply to Thread
Results 1 to 8 of 8

Ranking with multiple criteria and eliminating duplicates

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2016 Mac
    Posts
    11

    Ranking with multiple criteria and eliminating duplicates

    Good-evening, I have been searching for awhile now and I have not found a solution, so please forgive me if I have somehow missed it. I have a set of data as follows:

    Col A = Group
    Col B = # of Item A in the Group
    Col C = # of Item B in the Group
    Col D = total # in the Group
    Col E = % of Item A in the Group

    I would like to rank the Group by the number or Item A and then break ties with percentage of A in the Group.

    If Group 3 and 4 came back with 3 of Item A, but respectively had a percentage content of 50% and 75% I would like Group 4 to rank higher.

    I have tried several sum and averaging functions to no avail. Any suggestions? Very much appreciated!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Ranking with multiple criteria and eliminating duplicates

    Please attach a sample workbook with expected output for better understanding


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    04-15-2013
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2016 Mac
    Posts
    11

    Re: Ranking with multiple criteria and eliminating duplicates

    Sorry, I have not attached before. I hope this works.

    sample.xlsx

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Ranking with multiple criteria and eliminating duplicates

    Please show the expected output also

  5. #5
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Ranking with multiple criteria and eliminating duplicates

    Hi

    Welcome to the forum!

    Please see the file.
    Attached Files Attached Files
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  6. #6
    Registered User
    Join Date
    04-15-2013
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2016 Mac
    Posts
    11

    Re: Ranking with multiple criteria and eliminating duplicates

    Thank you very much micope21, for the welcome and the answer!

    Could you please help me understand the formula?

    =RANK(B3,B$2:B$50)+SUMPRODUCT(--(B$2:B$50=B3),--(E$2:E$50>E3))

    I understand the RANK, but I am unfamiliar with the "--" that appear in the SUMPRODUCT portion of the formula. What do they represent or mean?

  7. #7
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Ranking with multiple criteria and eliminating duplicates

    Hello,

    For lots of IF statement, (this = that, there > here, etc), it will often return boolean values (True / False).
    If you add "--" before the bracket, it will return "1" or "0" respectively for "True" or "False", thus making it easier for calculating (counting, for example).
    In the formula above, SUMPRODUCT acts as a counting formula, returning a list of "0" and "1" for each value that fits the criteria in it, then add them.
    Hope this help.

    Regards
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  8. #8
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Ranking with multiple criteria and eliminating duplicates

    The answer what Lemice said above.

+ 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