Having a cell remain blank when using formulas

I have a value in D1, and I'm subtracting from it the value in C1, with the difference between these two appearing in E1. What I would like to do is have the cell in E1 remain blank until both C1 and D1 have values in them. I am trying to avoid having a zero in E1.

Does anyone have any suggestions? Thank you.
Who is Participating?
Randy DownsOWNERCommented:
Try this


Use a number format to hide zero values in selected cells

Follow this procedure to hide zero values in selected cells. If the value in one of these cells changes to a nonzero value, the format of the value will be similar to the general number format.

    Select the cells that contain the zero (0) values that you want to hide.
    On the Format menu, click Cells, and then click the Number tab.
    In the Category list, click Custom.
    In the Type box, type 0;-0;;@


    The hidden values appear only in the formula bar Formula bar — or in the cell if you edit within the cell — and are not printed.
    To display hidden values again, select the cells, click the Cells command on the Format menu, and then click the Number tab. In the Category list, click General to apply the default number format. To redisplay a date or a time, select the appropriate date or time format on the Number tab.
I usually do something like:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.