#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kay Kay is offline
external usenet poster
 
Posts: 129
Default FORMULA

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.
--
KK
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default FORMULA

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

OR

=IF(C10,C5-C10,0)


If this post helps click Yes
---------------
Jacob Skaria


"Kay" wrote:

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.
--
KK

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default FORMULA

One way...

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

--
Biff
Microsoft Excel MVP


"Kay" wrote in message
...
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.
--
KK



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default FORMULA

Try this in H4:
=IF(LEN(C10)=0,0,C5-C10)

Hope this helps,

Hutch

"Kay" wrote:

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.
--
KK

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default FORMULA

"Kay" wrote:
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.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kay Kay is offline
external usenet poster
 
Posts: 129
Default FORMULA

I mean there is no "START
DATE" entered in the cell (it is just empty)
--
KK


"JoeU2004" wrote:

"Kay" wrote:
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.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kay Kay is offline
external usenet poster
 
Posts: 129
Default FORMULA

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


"JoeU2004" wrote:

"Kay" wrote:
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.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default FORMULA

Hi Kay,

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

"Kay" wrote:

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


"JoeU2004" wrote:

"Kay" wrote:
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.


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default FORMULA

"Kay" wrote:
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 -----

"Kay" wrote in message
...
I mean there is no "START
DATE" entered in the cell (it is just empty)
--
KK


"JoeU2004" wrote:

"Kay" wrote:
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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



All times are GMT +1. The time now is 08:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"