+ Reply to Thread
Results 1 to 13 of 13

Displaying cell as blank if cells summed have no value?

  1. #1
    Registered User
    Join Date
    12-31-2008
    Location
    England
    MS-Off Ver
    Excel O365
    Posts
    95

    Displaying cell as blank if cells summed have no value?

    I am stuck with working out a formula for the following.

    I need to sum H3:H64, but the some I was using showed the result as 100% if no data was in the cell and I want it to display blank if there is no value in either of the cells?

    Where am I going wrong please.

    The sum that displays 100% is this =100-SUM(H3:H64)/62 and I just nothing in it as I say if the value is blank

    I tried this -
    =SUM(H3:H64)/62(IF="0""")

    But it was a no go
    Last edited by abb16ott; 05-01-2010 at 01:53 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Displaying cell as blank if cells summed have no value?

    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!

  3. #3
    Registered User
    Join Date
    12-31-2008
    Location
    England
    MS-Off Ver
    Excel O365
    Posts
    95

    Re: Displaying cell as blank if cells summed have no value?

    Thanks Dave - Here we go.
    Attached Files Attached Files
    Last edited by davesexcel; 04-30-2010 at 10:19 PM.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Displaying cell as blank if cells summed have no value?

    You should attach a simple workbook example.
    Read Post 2,
    You should show what your original layout looks like and what the desired result should be.
    Keep it Simple.
    No unwanted sheets should be included in your example.

  5. #5
    Registered User
    Join Date
    12-31-2008
    Location
    England
    MS-Off Ver
    Excel O365
    Posts
    95

    Re: Displaying cell as blank if cells summed have no value?

    Sorry about that, is this ok?
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Displaying cell as blank if cells summed have no value?

    Hi,

    If I understand what you want, I think this is what you are looking for. It will calculate the percentage according to the number of cells that have data.

    =100-(SUM(H3:H64)/(62-COUNTBLANK(H3:H64)))

    abousetta

  7. #7
    Registered User
    Join Date
    12-31-2008
    Location
    England
    MS-Off Ver
    Excel O365
    Posts
    95

    Re: Displaying cell as blank if cells summed have no value?

    Quote Originally Posted by abousetta View Post
    Hi,

    If I understand what you want, I think this is what you are looking for. It will calculate the percentage according to the number of cells that have data.

    =100-(SUM(H3:H64)/(62-COUNTBLANK(H3:H64)))

    abousetta
    Hi,

    I gave that a whirl but the cell shows #DIV/0 ?

    Any idea what I can do please?

    Thanks

  8. #8
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Displaying cell as blank if cells summed have no value?

    That's because all the cells are currently empty.

    Try this, it will give you a 0 when all the cells from H3:H64 are empty.

    =IFERROR(100-(SUM(H3:H64)/(62-COUNTBLANK(H3:H64))),0)

    abousetta

  9. #9
    Registered User
    Join Date
    12-31-2008
    Location
    England
    MS-Off Ver
    Excel O365
    Posts
    95

    Re: Displaying cell as blank if cells summed have no value?

    Quote Originally Posted by abousetta View Post
    That's because all the cells are currently empty.

    Try this, it will give you a 0 when all the cells from H3:H64 are empty.

    =IFERROR(100-(SUM(H3:H64)/(62-COUNTBLANK(H3:H64))),0)

    abousetta
    Well now I am getting #NAME? - maybe it can't be done

  10. #10
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Displaying cell as blank if cells summed have no value?

    Do you have Excel 2007 or an earlier version? I came save your excel sheet as Excel 2003 and it warned me that this will happen. Its a compatibility issue.

    abousetta

  11. #11
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Displaying cell as blank if cells summed have no value?

    Try this formula. It seems to work fine in Excel 2003

    =IF(COUNTBLANK(H3:H64)=62,0,100-(SUM(H3:H64)/(62-COUNTBLANK(H3:H64))))

    abousetta

  12. #12
    Registered User
    Join Date
    12-31-2008
    Location
    England
    MS-Off Ver
    Excel O365
    Posts
    95

    Re: Displaying cell as blank if cells summed have no value?

    Quote Originally Posted by abousetta View Post
    Try this formula. It seems to work fine in Excel 2003

    =IF(COUNTBLANK(H3:H64)=62,0,100-(SUM(H3:H64)/(62-COUNTBLANK(H3:H64))))

    abousetta
    Yes I have Excel 2003.

    I have just given this one a go and - hey presto it appears to be working

    Thank you for all that hard work.

    Regards.

  13. #13
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Displaying cell as blank if cells summed have no value?

    Glad I could help. Just remember that if you ever change the range, to update the formula because it uses the magic number 62 is several places in the formula.

    If you are satisfied with the results, then please mark the thread as [SOLVED].

    abousetta

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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