FORMULA

K

Kay

I have the following formula in Cell H4
= cell C5 (which is the end date) minus cell C10 (which is the start date) I
want to add another formula in Cell H4 to make it = 0 if Cell C10 is empty.

Thank you.
 
J

Jacob Skaria

=IF(COUNT(C10,C5)=2,C5-C10,0)

OR

=IF(C10,C5-C10,0)


If this post helps click Yes
 
J

JoeU2004

Kay said:
I have the following formula in Cell H4
= cell C5 (which is the end date) minus cell C10 (which is the start date)
I
want to add another formula in Cell H4 to make it = 0 if Cell C10 is
empty.

Depends on your definition of "empty". I suspect you mean: __appears__
empty. The simplest formula is:

=if(C10="", 0, C5 - C10)

Do not use IF(ISBLANK(C10),"",...). ISBLANK returns true only when the cell
is truly empty; that is, no formula and no constant.

If you use the formula above in H4, H4 might be an example of a cell that
__appears__ empty, but ISBLANK(H4) is FALSE.
 
K

Kay

The formula is in H4 - I want to use both formula C5-C10 =, but if C10 is
empty H4 is to =0
 
J

JoeU2004

Kay said:
I mean there is no "START
DATE" entered in the cell (it is just empty)

Okay. But you can still use simply IF(C10="",0,...), and I still think that
is preferrable to IF(ISBLANK(C10),0,...).


----- original message -----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top