Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2008
    Posts
    109

    Help with Formula to Remove Zeros from Cells

    Hello,

    Wondering if one of you experts out there can help me with this formula.

    I am trying to create a formula to remove 0 in a linked cell. I want to show blank cells, no zeros.

    Here is my attempt at the formula:

    =IF (E160=0,,(NETD(C106,D106))

    I am using Excel 2010.

    Thank you. :-)

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,514
    are there actually zeros in that / those columns, or is there a format that is representing "" as 0
    if its a format then you will need to change the format itself
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2008
    Posts
    109
    No, there is actually "0" in the cell.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,514
    is this for display purposes of use elsewhere
    ie do you actually want to set the value to be "" or just see the value as ""?

    if the latter than using a cusotm format may be the smartest approach
    eg:-
    Code:
    #,##0;[Red]-#,##0;""
    its the third term that says effectively if 0 then display as ""

    if you need to physically remove the 0 then you'd probably need to write some VBA code and run it as a macro
    My Excel is very rusty
    but you'd need to work out what the range of cells you were going to examine
    then for each cell check to see if its a 0 value and if so set that cell to ""
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Sep 2008
    Posts
    109
    No, it is not a display or format issue. I did it before with a formula, but I don’t think I am structuring my formula correctly. :-(

  6. #6
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    508
    If the 0 in E160 is a string type rather than a double (ie. "0" rather than 0) then your formula won't pick it up. To cater for both you could use something like the below.
    Code:
    =IF(OR(E160={0,"0"}),"",NETD(C106,D106))
     
    or
     
    =IF(E160&""="0","",NETD(C106,D106))

  7. #7
    Join Date
    Sep 2008
    Posts
    109
    Hi Colin,

    Thank you so much for your response. I tried both of your suggestions and neither one worked. :-(

    The cell is in general format. I also tried number format and that did not work either.

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,514
    Quote Originally Posted by mlrnet View Post
    Hello,
    I want to show blank cells, no zeros.
    ..in which case the supplied formatting rule in post#4 does the job. granted you may want to remove the red colouring for negative numbers but thats easily dooable. just remove the [red]

    what is NETD(X,Y)?

    the only time I'd worry about whether there is a 0 or not in a cell woudl be if I was using the domain statistical function such as AVG, STDDEV and so on, as in those functions 0 is not the the same as nothing
    I'd rather be riding on the Tiger 800 or the Norton

  9. #9
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    508
    If you still don't have a solution which works then please zip/attach a simple example for us to see.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •