+ Reply to Thread
Results 1 to 8 of 8

Using SUMPRODUCT to conditionally rank but not capturing everything

  1. #1
    Registered User
    Join Date
    09-20-2022
    Location
    London
    MS-Off Ver
    Excel for MS365 MSO (Version 2208 Build 16.0.15601.20148) 64-bit
    Posts
    3

    Red face Using SUMPRODUCT to conditionally rank but not capturing everything

    Hi there,

    Using this for the first time so please bear with if I've missed anything

    I want to conditionally rank these categories, with each different category having its own rank.
    However it doesn't seem to be working properly, could someone take a look please?

    The countif at the end of the cell is to get rid of duplicate values having the same rank.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Using SUMPRODUCT to conditionally rank but not capturing everything

    Administrative Note:

    Welcome to the forum.

    Members will tailor the solutions they offer to the version (NOT a release number like 2208) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Using SUMPRODUCT to conditionally rank but not capturing everything

    1. What do you mean by 'not working properly'?
    2. Please add expected results MANUALLY to your workbook for at least FIVE categories.

  4. #4
    Registered User
    Join Date
    09-20-2022
    Location
    London
    MS-Off Ver
    Excel for MS365 MSO (Version 2208 Build 16.0.15601.20148) 64-bit
    Posts
    3

    Re: Using SUMPRODUCT to conditionally rank but not capturing everything

    Thanks, added manual examples.

    So each different category is ranked separately, going in ascending order.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Using SUMPRODUCT to conditionally rank but not capturing everything

    Try this instead:

    =SUMPRODUCT(--($A$2:$A$267=A2)*(B2<$B$2:$B$267))+COUNTIFS($A$2:A2,A2,$B$2:B2,B2)

  6. #6
    Registered User
    Join Date
    09-20-2022
    Location
    London
    MS-Off Ver
    Excel for MS365 MSO (Version 2208 Build 16.0.15601.20148) 64-bit
    Posts
    3

    Re: Using SUMPRODUCT to conditionally rank but not capturing everything

    I think you've hit the nail on the head here, thanks very much!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Using SUMPRODUCT to conditionally rank but not capturing everything

    Great!

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  8. #8
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Using SUMPRODUCT to conditionally rank but not capturing everything

    If they are always sorted as the example then you could use

    =IF(A2=A1,C1+1,1)

    Or a different way is:

    =MATCH(B2+ROW(B2)/10^6,FILTER($B$2:$B$267+ROW($B$2:$B$267)/10^6,$A$2:$A$267=A2),0)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Duplicates in rank conditionally formatting
    By bexlee in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 02-11-2022, 08:22 AM
  2. [SOLVED] Conditionally rank list sequentially without skipping rank value
    By jelco in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-17-2019, 11:11 AM
  3. Return Name of SUMPRODUCT and Rank
    By wn2tappe in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 11-20-2015, 08:02 AM
  4. Rank Using SUMPRODUCT and COUNTIF but still getting duplicates
    By cmertel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-28-2014, 10:33 AM
  5. [SOLVED] Rank If/SumProduct complex formula
    By chatcher88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2013, 01:24 PM
  6. [SOLVED] Sumproduct or Sumif of cells that aren't conditionally formatted
    By svalentine91 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-01-2013, 11:21 AM
  7. Replies: 2
    Last Post: 12-16-2011, 10:54 AM

Tags for this Thread

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