#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Excel Formula

I am trying to get results for cells with dates in them. Who do get the
following results:
a2 = begining date (3/4/8)
b2 = ending date (3/5/8)
c2 = difference (1)
I do not want (zero) 0 to show up if the cells are blank
I do not want a negative number to show if b2 is blank
I do want a zero to show if the b2-a2=0

here is the current formula I am using
=IF((N73-M73<0)," ",(SUM(N73-M73)))
If the M & N are blank I get a zero in O73. I want O73 to be blank
If N73 is blank, O73 is also bank. This is OK
If N73 & M73 have the same date I get Zero in O73. This OK


--
Lisa M.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Excel Formula

=IF(OR(M73="",N73="",N73=M73),"",N73-M73)

--
Gary''s Student - gsnu200773
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Excel Formula

Hi Gary,

Your formula does allow for the number zero to show if N73-M73 = 0
3/4/8 - 3/4/8 = 0 Zero needs to show in O73
--
Lisa M.


"Gary''s Student" wrote:

=IF(OR(M73="",N73="",N73=M73),"",N73-M73)

--
Gary''s Student - gsnu200773

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Excel Formula

Looking at your formula, you don't need the SUM() function, because you are
not adding a series of parameters; look at Excel help for the SUM function.
Also, you don't need so many parentheses, but they don't do any harm.
Also you don't need spaces between the double quotes to get a blank; easier
to stick to "", then it's easier to test for such an empty string.

You seem confused between A2/B2/C2 and M73/N73/O73, and you've also
apparently contradicted yourself in saying
"I do want a zero to show if the b2-a2=0", but also saying
"If N73 & M73 have the same date I get Zero in O73. This OK".

But you could try:
=IF(OR(N73="",M73=""),"",N73-M73)
--
David Biddulph

"Lisa" wrote in message
...
I am trying to get results for cells with dates in them. Who do get the
following results:
a2 = begining date (3/4/8)
b2 = ending date (3/5/8)
c2 = difference (1)
I do not want (zero) 0 to show up if the cells are blank
I do not want a negative number to show if b2 is blank
I do want a zero to show if the b2-a2=0

here is the current formula I am using
=IF((N73-M73<0)," ",(SUM(N73-M73)))
If the M & N are blank I get a zero in O73. I want O73 to be blank
If N73 is blank, O73 is also bank. This is OK
If N73 & M73 have the same date I get Zero in O73. This OK


--
Lisa M.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Excel Formula

Thanks David. That worked
--
Lisa M.


"David Biddulph" wrote:

Looking at your formula, you don't need the SUM() function, because you are
not adding a series of parameters; look at Excel help for the SUM function.
Also, you don't need so many parentheses, but they don't do any harm.
Also you don't need spaces between the double quotes to get a blank; easier
to stick to "", then it's easier to test for such an empty string.

You seem confused between A2/B2/C2 and M73/N73/O73, and you've also
apparently contradicted yourself in saying
"I do want a zero to show if the b2-a2=0", but also saying
"If N73 & M73 have the same date I get Zero in O73. This OK".

But you could try:
=IF(OR(N73="",M73=""),"",N73-M73)
--
David Biddulph

"Lisa" wrote in message
...
I am trying to get results for cells with dates in them. Who do get the
following results:
a2 = begining date (3/4/8)
b2 = ending date (3/5/8)
c2 = difference (1)
I do not want (zero) 0 to show up if the cells are blank
I do not want a negative number to show if b2 is blank
I do want a zero to show if the b2-a2=0

here is the current formula I am using
=IF((N73-M73<0)," ",(SUM(N73-M73)))
If the M & N are blank I get a zero in O73. I want O73 to be blank
If N73 is blank, O73 is also bank. This is OK
If N73 & M73 have the same date I get Zero in O73. This OK


--
Lisa M.






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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
Excel Formula Doesn't Execute (Shows formula-not the calcuation) Keys1970 Excel Discussion (Misc queries) 4 November 15th 06 02:12 PM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM
How do I view formula results intead of formula in excel? davidinatlanta Excel Worksheet Functions 4 February 7th 06 03:02 PM


All times are GMT +1. The time now is 12:43 PM.

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

About Us

"It's about Microsoft Excel"