+ Reply to Thread
Results 1 to 10 of 10

Countif not split a tie from rank function?

  1. #1
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Countif not split a tie from rank function?

    Hi,

    Have highlight the cells in bright yellow which are tied for some reason?

    Thanks

    Andrew
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Countif not split a tie from rank function?

    your first formula in that column is wrong...=RANK(AO3,$AO$3:$AO$45,1)+COUNTIF(AO3:AO$3,AO3)-1
    it should be this...
    =RANK(AO3,$AO$3:$AO$45,1)+COUNTIF($AO$3:AO3,AO3)-1
    then dragged down
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,740

    Re: Countif not split a tie from rank function?

    Check out Chip Pearson's site here:

    http://www.cpearson.com/Excel/rank.aspx

    and scroll down to the section on "Unique Ranks in Ascending Order". You will see that the formula (and logic) is slightly different in this case.

    Also, note that your formulae in column AO refer to some external file, which we do not have access to.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Countif not split a tie from rank function?

    Quote Originally Posted by Sambo kid View Post
    your first formula in that column is wrong...=RANK(AO3,$AO$3:$AO$45,1)+COUNTIF(AO3:AO$3,AO3)-1
    it should be this...
    =RANK(AO3,$AO$3:$AO$45,1)+COUNTIF($AO$3:AO3,AO3)-1
    then dragged down
    Are you sure? Still getting a tie

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Countif not split a tie from rank function?

    I've tried three different rank formulas including changing the order from ascending to descending and you still end up with a tie. I know I saw a sumproduct used for this once but I cannot remember how it was written. Maybe someone else can come up with a way to break the ties. (I've never seen it not work before.)

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Countif not split a tie from rank function?

    Try in AP3

    =SUMPRODUCT(--($AO$3:$AO$26<AO3))+COUNTIF($AO$3:AO3,AO3)

    or just

    =COUNTIF($AO$3:$AO$26,"<"&AO3)+COUNTIF($AO$3:AO3,AO3)

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Countif not split a tie from rank function?

    @Ace_XL, nice, I knew there was a sumproduct for it, I'm assuming to get them in descending order you change the "<" to ">".

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Countif not split a tie from rank function?


  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Countif not split a tie from rank function?

    it didn't seem like a floating decimal issue to me when both values being ranked were so different.

  10. #10
    Registered User
    Join Date
    01-17-2020
    Location
    UK
    MS-Off Ver
    2016
    Posts
    43

    Re: Countif not split a tie from rank function?

    Quote Originally Posted by Ace_XL View Post
    Try in AP3

    =SUMPRODUCT(--($AO$3:$AO$26<AO3))+COUNTIF($AO$3:AO3,AO3)

    or just

    =COUNTIF($AO$3:$AO$26,"<"&AO3)+COUNTIF($AO$3:AO3,AO3)

    Copy down
    Many thanks. Worked perfectly

+ 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] Countif, non blank values (Rank)
    By Median in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-16-2018, 12:11 PM
  2. Replies: 3
    Last Post: 02-08-2016, 06:55 PM
  3. Rank function with countif
    By jninyo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-20-2015, 03:06 AM
  4. Help with Rank/Countif Function
    By 13MARINO in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-12-2014, 09:17 AM
  5. [SOLVED] Using the RANK function to rank decimal numbers
    By CRinne in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-29-2013, 02:14 PM
  6. Countif and Rank Formula
    By Excel Dumbo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-04-2013, 04:16 AM
  7. Can excels Split() function split a string up at multiple spots?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2011, 02:36 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