#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Formula

I have a column that accepts dates (8/14/07). some of the cells don't have
any dates cause there is no need. I am trying to use an if statement
referring to this column to perform a mathematical function. what i have is
=IF(C7=C6,SUM(Z7-Z6),""). If works fine but when both cells are blank it
returns a time of 0:00 and i want it to return a blank cell, the same as it
would if it was false. i've tried AND and OR and cannot figure out how to do
it correctly. Can someone help me?

The Z cells are formatted for time as is the cell the result is going into.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Formula

=IF(OR(C7<C6,AND(C6="",C7="")),"",Z7-Z6)

Remember that the SUM() function doesn't do anything for you if you give it
only one argument.
SUM(Z7-Z6) is as pointless as PRODUCT(Z7-Z6) or AVERAGE(Z7-Z6) or
MINIMUM(Z7-Z6) or MAXIMUM(Z7-Z6) or ...
--
David Biddulph

"ucastores" wrote in message
...
I have a column that accepts dates (8/14/07). some of the cells don't have
any dates cause there is no need. I am trying to use an if statement
referring to this column to perform a mathematical function. what i have
is
=IF(C7=C6,SUM(Z7-Z6),""). If works fine but when both cells are blank it
returns a time of 0:00 and i want it to return a blank cell, the same as
it
would if it was false. i've tried AND and OR and cannot figure out how to
do
it correctly. Can someone help me?

The Z cells are formatted for time as is the cell the result is going
into.



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 11:00 AM.

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"