+ Reply to Thread
Results 1 to 8 of 8

Ignore zeroes for ranking purposes

  1. #1
    Registered User
    Join Date
    11-24-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    12

    Ignore zeroes for ranking purposes

    Hi All

    I have a sum function which is returning Zero for cells with no data only a formula. This is making it hard for me to rank my entries, as the zero automatically sets that person as best ranked.

    Is there a way of removing the zero from the Sum Function? or getting my Rank to ignore entries listed with a zero? If(iserror) an If(Isblank) do not help, as the formula get make the cell appear containing data

    Any help would be great please

    Column AA is the Sum and Column AC is the rank
    Attached Images Attached Images
    Last edited by 6StringJazzer; 09-27-2018 at 11:05 AM. Reason: Moderator clarified title

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,087

    Re: Zero are a pain !!!!

    Your image doesn't tell us anything about your problem, or let us see your formulas. An image attachment has very little value. Just attach the Excel file. It's easier than taking a screenshot first and then attaching that.

    The paper clip icon does not work for attachments. Instead, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.

    I have also updated your title, which should summarize your question.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,873

    Re: Ignore zeroes for ranking purposes

    Well, to not include zeros jou could use just SUMIF(range,"<>0") but you probably not want to sum zeros (the sum x+0 is still x :-)) but somehow treat them special.

    As you mentioned "if(iserror)" (and seeing excel 2003 in your profile - is that true?)
    you can try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  4. #4
    Forum Contributor
    Join Date
    03-28-2018
    Location
    Houston, TX
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    127

    Re: Ignore zeroes for ranking purposes

    russellhiedi,

    If you enter this formula in cell AC2 and then copy it down, it should do the trick. It will adjust the ranking for you based on how many zeros are in column AA. If you want to limit the range to not include the entire column, it would be ideal. Since I don't know how many rows are in your data, I included the whole column in the formula.

    =IF(AA2=0,"",RANK(AA2,$AA:$AA,1)-COUNTIF($AA:$AA,0))

    Thanks!

  5. #5
    Registered User
    Join Date
    11-24-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Ignore zeroes for ranking purposes

    That worked perfectly - thank you.

    Would you mind explaining how that formula works for my head. I think I get the IF = 0 shows blank. But why a countif on the end?

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Ignore zeroes for ranking purposes

    See if this helps with an explanation...

    Ranking Data
    HTH
    Regards, Jeff

  7. #7
    Forum Contributor
    Join Date
    03-28-2018
    Location
    Houston, TX
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    127

    Re: Ignore zeroes for ranking purposes

    Quote Originally Posted by russellhiedi View Post
    Would you mind explaining how that formula works for my head. I think I get the IF = 0 shows blank. But why a countif on the end?
    The IF simply handles the output in cases where the sum is 0. However, the RANK function will still count the zeros. The COUNTIF function is there so that the number of zeros in the column are subtracted from the RANK.

    As an example, let's say you have 10 zeros in your data. Then the zeros will all have a rank of 1 and the other sums will be ranked starting at 11 and going on. The COUNTIF($AA:$AA,0) counts the number of zeros that are in column AA... in this case 10. Since the ranking would start at 11, subtracting 10 from that will get you the rank of 1, 12 - 10 = 2, etc. That's how it works.

  8. #8
    Registered User
    Join Date
    11-24-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Ignore zeroes for ranking purposes

    Hi Brant, your a legend.

    That makes absolute perfect sense and you have a great way of explaining things.

    Cheers for you help buddy ����

+ 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. hi, this is Pain
    By payinnlain in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-27-2012, 04:11 AM
  2. Freeze Pain
    By MPK in forum Excel General
    Replies: 2
    Last Post: 12-06-2008, 01:24 PM
  3. Comments on frozen pain
    By Flints in forum Excel General
    Replies: 3
    Last Post: 08-08-2006, 11:40 AM
  4. Oh God the Pain! Help Please!
    By jshpik1 in forum Excel General
    Replies: 2
    Last Post: 05-09-2006, 03:25 AM
  5. [SOLVED] Simple Report is such a pain!
    By Tiff in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-27-2006, 02:30 PM
  6. Pain in the *** macro Part 2
    By JesseK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2005, 01:05 PM
  7. Pain in the *** macro
    By JesseK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2005, 01:05 PM
  8. [SOLVED] pain cell max and min
    By yuvalbra@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2005, 06:06 AM

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