If statement with time
My formula to calculate time in cell C7 looks like this:
=IF(B70,(B7-A7)*1440,0)
A7 and B7 are formatted for am/pm time. C7 is formatted for number. I
have 9:00 am in A7 and 9:30 am in B7. It calculates 30. When I ask the if
statement to return a 0 when the statement is true, it returns it as false
instead with a 1.
Hope that makes sense.
--
-CRM
"David Biddulph" wrote:
Is the C7 cell calculating a number of minutes, or is it a time in Excel
format? What is your formula, and what are the input values to the formula?
What value do you see in C7 if you temporarily change the format from time
to General or Number?
Also, are you sure that the time calculated is exactly 30 minutes, or might
it be 29.9999999 or 30.000001? You may wish to include a ROUND function in
your criterion.
--
David Biddulph
"saltnsnails" wrote in message
...
Stefi,
Thanks for the reply. I inputed that formula but it is still returning a
1
when the calculated time cell equals 30.
--
-CRM
"Stefi" wrote:
Try
=IF(MINUTE(C7)=30,0,1)
Regards,
Stefi
"saltnsnails" ezt Ã*rta:
I have a formula that calculates time. It works well. I am trying to
have
another formula return a value based on time calculated. If a cell
equals 30
minutes I want the formula to return a value of 0. If it does not
equal 30,
I would like a value of 1. So I have entered =if(c7=30, 0, 1). C7
refers to
the cell where the time is calculated. I entered time data and the
time
calculates a 30 but the other formula is returning a 1. Any thoughts?
--
-CRM
|