+ Reply to Thread
Results 1 to 11 of 11

How To Rank Or Create A Top 5 Count / Rank With If Condition

  1. #1
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    How To Rank Or Create A Top 5 Count / Rank With If Condition

    Hello,

    Looking for some help on this please see attached.

    The data is in columns D & E. What I need is a formula that can give me the results in column F.

    I only need the top 3 but if the formula ranks all values for A that would be fine too.

    If the values are the same they can return the same rank that is not a big deal.

    Note A may have more or less entries than B or C etc.

    Thank you!
    Attached Files Attached Files
    Last edited by PaddyP; 05-14-2019 at 02:58 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    Try this:
    Please Login or Register  to view this content.
    You could use an IF statement or conditional formatting to hide values larger than 3. Does that give you what you're looking for?
    If someone helped achieve your solution, consider clicking "* Add Reputation" on their post.

    If your question has been answered, mark the thread as [SOLVED] using the Thread Tools menu at the top of the thread.

  3. #3
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    AMAZING!

    I am not entirely sure how it works but it does!

    Thank you very much.

  4. #4
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    You're welcome, happy to help, thanks for the rep

    I'll offer the explanation the way I understand it, which may not be exactly correct as to how Excel functions behind the scenes. Basically, it creates two arrays of TRUE/FALSE statements, also seen as arrays of 1/0. It compares the arrays and finds the one spot where both are TRUE, and returns that common location. The +1 is so the ranks start at 1 instead of 0. You can always go to the Formulas tab in the ribbon and click Evaluate Formula to see what's going on. It's one of the most useful tools in Excel!

  5. #5
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    Very useful. Thanks again. I will certainly check that out in the future.

  6. #6
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    Hello Again,

    Wanted to follow up and say how much my team has appreciated the shortcuts that this formula has provided!

    I am wondering if we can perfect it with one further step. Right now if two values are the exact same it will return the same rank.

    Current Example

    A $10 1
    A $9 3
    A $10 1
    A $8 4

    What I would love to see is one of the 1's switched to a 2. (Doesn't matter which 1 is swapped)

    Let me know if there is an easy solution. If not I can swap the ties manually. It is not a huge deal the original formula solves 99% of my problems.
    Last edited by PaddyP; 05-14-2019 at 09:42 AM.

  7. #7
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    This is based on the file in post #1. Try this:
    Please Login or Register  to view this content.
    It may need some adjustments, depending on the ranges in your actual file. Hopefully it works for you.

  8. #8
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    Thank you Melvosh!

    We are almost there! This does solve the problem I had for the above example however if there are more than 2 items with the same value the 2nd and 3rd will now return same value.

    Anyway around this?

  9. #9
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    Try this:
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Ontario
    MS-Off Ver
    365
    Posts
    157

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    BRAVO!

    Very grateful for your help on this.

    Thank you!

  11. #11
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: How To Rank Or Create A Top 5 Count / Rank With If Condition

    You're welcome, thanks for the rep!

+ 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. [SOLVED] forcing a rank on 1 through 5 (no dups) using the rank formula in Excel
    By denver1717 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-22-2015, 08:28 AM
  2. Replies: 8
    Last Post: 02-20-2014, 07:03 PM
  3. RANK - Non unique values, contiguous rank required
    By PaulBo in forum Excel General
    Replies: 9
    Last Post: 02-20-2014, 10:34 AM
  4. Replies: 6
    Last Post: 11-30-2013, 09:14 AM
  5. Replies: 1
    Last Post: 11-30-2013, 06:48 AM
  6. Formula to Rank and populate values base don Rank
    By Excel Dumbo in forum Excel General
    Replies: 3
    Last Post: 10-09-2012, 02:02 AM
  7. Replies: 1
    Last Post: 08-15-2005, 05: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