+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : Assistance on Ranking Formula to make blank values equal to zero

  1. #1
    Registered User
    Join Date
    07-13-2011
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2007
    Posts
    5

    Assistance on Ranking Formula to make blank values equal to zero

    Hello,
    I've made a ranking formula that actually works, but I need to have the formula to make blank values to 0 (zero). I have the totals on J5:J33 and the ranking value on K5:K33. Any assistance will be appreciated. thanks. Here is my formula:

    =IF((SUM(IF( $J$5:$J$33=J5,1))) =1,(SUM(IF( $J$5:$J$33>=J5,1,0))),( SUM(IF($J$5:$J$33 >=J5,1)))-(( SUM(IF( $J$5:$J$33=J5,1))) -1)*0.5)
    Last edited by michelbalendo; 07-13-2011 at 10:06 AM. Reason: Inaccurate information

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Assistance on Ranking Formula to make blank values equal to zero

    That is an array formula which needs to confirmed with CTRL+SHIFT+ENTER to work..

    or you can simply to:

    =IF(COUNTIF($J$5:$J$33,J5)=1,COUNTIF($J$5:$J$33,">="&J5),COUNTIF($J$5:$J$33,">="&J5)-(COUNTIF($J$5:$J$33,J5)-1)*0.5)

    with normal ENTER entry.

    These formulas will ignore (see blanks as 0)... so what is the issue? Not sure I understand.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-13-2011
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Assistance on Ranking Formula to make blank values equal to zero

    IWell, I have a spreadsheet that ranks a total of 28 entries, and sometimes there aren't 28 entries. I just wanted the ranking to be blank where ever there wasn't an entry. for some reason, I get the number 15 on the blank entries. I hope that cleared things up a little. Thank you

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Assistance on Ranking Formula to make blank values equal to zero

    Does this work for you?

    =IF(J5="","",IF(COUNTIF($J$5:$J$33,J5)=1,COUNTIF($J$5:$J$33,">="&J5),COUNTIF($J$5:$J$33,">="&J5)-(COUNTIF($J$5:$J$33,J5)-1)*0.5))

  5. #5
    Registered User
    Join Date
    07-13-2011
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Assistance on Ranking Formula to make blank values equal to zero

    It's still giving me a 15 rank on the blank entries.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Assistance on Ranking Formula to make blank values equal to zero

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Assistance on Ranking Formula to make blank values equal to zero

    Or maybe:

    =IF(N(J5)=0,"",IF(COUNTIF($J$5:$J$33,J5)=1,COUNTIF($J$5:$J$33,">="&J5),COUNTIF($J$5:$J$33,">="&J5)-(COUNTIF($J$5:$J$33,J5)-1)*0.5))

    if not, post the workbook.

  8. #8
    Registered User
    Join Date
    07-13-2011
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Assistance on Ranking Formula to make blank values equal to zero

    Quote Originally Posted by NBVC View Post
    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Here is what I am trying to do
    Attached Files Attached Files

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Assistance on Ranking Formula to make blank values equal to zero

    Try the last revision to my formula above:

    =IF(N(J5)=0,"",IF(COUNTIF($J$5:$J$33,J5)=1,COUNTIF($J$5:$J$33,">="&J5),COUNTIF($J$5:$J$33,">="&J5)-(COUNTIF($J$5:$J$33,J5)-1)*0.5))

    depending on what you want the outcome to be for duplicates, this shorter formula may be an alternative:

    =IF(N(J5)=0,"",RANK(J5,$J$5:$J$33)+COUNTIF(J$5:J5,J5)-1)

  10. #10
    Registered User
    Join Date
    07-13-2011
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2007
    Posts
    5

    Thumbs up Re: Assistance on Ranking Formula to make blank values equal to zero

    Quote Originally Posted by NBVC View Post
    Or maybe:

    =IF(N(J5)=0,"",IF(COUNTIF($J$5:$J$33,J5)=1,COUNTIF($J$5:$J$33,">="&J5),COUNTIF($J$5:$J$33,">="&J5)-(COUNTIF($J$5:$J$33,J5)-1)*0.5))

    if not, post the workbook.
    That worked NBVC! Thanks for the great help. Your assistance is highly appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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