Reply
Thu 30 Sep, 2004 01:53 pm
How can I add values in Excel cells only when there is a value present? If there is no integer in the cell I want ADD to ignore the cell.
So far my formulas are assuming a zero is present and using this zero cell to affect other calculations in my spreadsheet.
What is the zero interfering with - something like the Count function.
Well maybe this, if I get the syntax right, working from memory:
=if(A1=0, " ", A1)
Just try putting this formula into the cell you want to be blank instead of zero. A1 would be the cell from which the value comes. Haven't tested this, and not sure it addresses your question, but give it a shot. The space between the two quotation marks will return a blank.
If this doesn't do what you want, you might check out some of the advanced cell formatting options.
If I remember correctly, you can do a countif statement and have the positive condition be something like "is not null" or perhaps the negative condition be ="" (note that that's two double quotes with nothing between them - the definition of null. If it is not a true null that you want to get rid of, and rather a 0, the negative condition would instead be ="0"