+ Reply to Thread
Results 1 to 13 of 13

Rankif Function

  1. #1
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    Rankif Function

    Hi everyone,

    I'm looking for a bit of help on a Rankif function to help me see how products rank within their respective sub-categories. I have a large list of products in a worksheet each with a unique identifier (Column A) and Sub-Category (Column D). There are then a number of scoring criteria which create a Overall Popularity Score (Column AZ). This score is then used to rank the products in Column BA. Note I have written this Rank function to ensure that if two or more products get the same score then they are given sequential ranking so no product gets the same ranking. So far no problem.

    However, I'd like to now rank these products in terms of their Overall Popularity Score (Column AZ) within their Sub-Category; if two or more products in a sub-category score the same then again I would like their ranking to be sequential. I'd like to have a column for each Sub-Category (Columns BB2 to BL2 which define the sub-category name) which shows the product ranking within it's sub-category. By having these 11 columns it will enable me to create a dashboard for each Sub-Category so I can have dynamic and visual products for each.

    Does this make sense? Can anyone help me out?

    Thanks

    Nick

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

    Re: Rankif Function

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    Re: Rankif Function

    As requested, here's an example with the desired outcomes shown in yellow.
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Rankif Function

    There is no RANKIF() function (yet), you will need a RANK(IF()) ARRAY formula, I will see what I can put together for you
    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
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    Re: Rankif Function

    Thanks FDibbins, greatly appreciated

  6. #6
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    Re: Rankif Function

    Shamelessly bumped up the thread....I need help!

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,176

    Re: Rankif Function

    Try this in J2:

    =IF(RIGHT(J$1,LEN($C2))=$C2,COUNTIFS($C$2:$C$10,$C2,$H$2:$H$10,">"&$H2)+COUNTIFS($C$2:$C2,$C2,$H$2:$H2,$H2),"")

    Copy acroos and down.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,695

    Re: Rankif Function

    Quote Originally Posted by Nick2512 View Post
    Shamelessly bumped up the thread....I need help!
    So does everyone who comes here. Please wait at least 24 hours before bumping threads in future, and remember that your helpers are volunteers from all around the globe.

  9. #9
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    Re: Rankif Function

    Phuocam.....YOU ARE A GENIUS!!!! This works perfectly, kudos to you,kudos indeed

    Quote Originally Posted by Phuocam View Post
    Try this in J2:

    =IF(RIGHT(J$1,LEN($C2))=$C2,COUNTIFS($C$2:$C$10,$C2,$H$2:$H$10,">"&$H2)+COUNTIFS($C$2:$C2,$C2,$H$2:$H2,$H2),"")

    Copy acroos and down.

  10. #10
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    Re: Rankif Function

    Sorry, will be less impatient next time.....the people here are so helpful and geniuses!

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Rankif Function

    Quote Originally Posted by Nick2512 View Post
    Thanks FDibbins, greatly appreciated
    My apologies, real life interfered again

  12. #12
    Registered User
    Join Date
    02-05-2017
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    26

    Re: Rankif Function

    No worries dude, life happens! Not to worry, got a fine solution to my problem.

    Quote Originally Posted by FDibbins View Post
    My apologies, real life interfered again

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Rankif Function

    Good stuff

+ 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. Replies: 1
    Last Post: 02-10-2017, 12:34 PM
  2. [SOLVED] Rankif function - Is there a way to rank based on an argument.
    By JessieMTX in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-19-2016, 02:34 PM
  3. Rankif with tie breaker
    By huy_le in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-13-2014, 06:22 AM
  4. [SOLVED] Rankif with 2 criteria
    By huy_le in forum Excel Formulas & Functions
    Replies: 40
    Last Post: 04-15-2014, 03:33 PM
  5. [SOLVED] Rankif Question
    By huy_le in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-18-2014, 07:23 PM
  6. Rankif?
    By Lee Harris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-20-2007, 05:28 AM
  7. Is there a rankif function
    By Dan in forum Excel General
    Replies: 3
    Last Post: 05-27-2005, 01:05 PM

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