If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back  dBforums > PC based Database Applications > Microsoft Excel > Help with Formula to Remove Zeros from Cells

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Sep 2008
Posts: 102
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. :-)
Reply With Quote
  #2 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,215
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Sep 2008
Posts: 102
No, there is actually "0" in the cell.
Reply With Quote
  #4 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,215
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Sep 2008
Posts: 102
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. :-(
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
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))
__________________
Colin

RAD Excel Blog
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Sep 2008
Posts: 102
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.
Reply With Quote
  #8 (permalink)  
Old
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 12,215
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #9 (permalink)  
Old
Registered User
 
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.
__________________
Colin

RAD Excel Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On