You are here:

# Excel/zeros in excel cells only when data is entered.

Question
=SUM(D9+E9) answer goes in cell F8

=SUM(F9-G9) answer goes in cell I9

I have these two formulas and I only want a zero to appear in the cell when data is entered in the cells it corresponds with.  When no data is entered I want the cell to remain blank.  Can you help me figure this out.

Hey Pauline
I am not sure what you mean by "when data is entered in the cells it corresponds with",  so I will give you a couple of answers.

one is --You can use the excel advanced options and eliminate zeroes in all cells.  To do that you go to the toolbar then click on the office button at the top left then on the drop down list at the bottom right click excel options, then from the next list click advanced.  Then from the next series of lists scross down to display options for worksheet and uncheck the box that says show a zero in cells that have a zero value.  this will eliminate all zeroes from the worksheet.

another is--Use an IF formula to to put a zeroe in when you want it.  Since I am not sure what your criteria are for haveing a zeroe in the cell or not I will give you an example of what I mean

=F(AND(D9<>0,E9<>0),+D9+E9,"")

This formula applies two tests if D9 is not a zero and if E9 is not a zero then it will add D9 and E9 together and if the result of adding the two together is a zeroe then it will put a zero in the cell.  If the result is not a zeroe then it will put that value in the cell.  If either D9 or E9 are equal to zeroe (or blank) then the formula will put a blank in the cell.

This may not be exactly what you are looking for but if not I believe you can work our the formula that will work for you using my example.  If you can't then let me know.

Hope this helps

Richard
Florida
USA
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

#### Richard Roberts

##### Expertise

Can assist you in most areas of Excel, have been working with it for about 15 years in many types of applications, but primarily in financial and accounting applications. I am a CPA and many client or client problems have necessitated the use of excel. I am not an expert in charting, macros, or pivot tables.

##### Experience

Have been working with Excel for about 20 years primarily in accounting and financial areas.

Education/Credentials
BA, Certified Public Accountant