IF statement for time based data
K1 is generated by an IF statement. The value in the cell is exactly 0:05.
What I'm trying to do is assign a range to this value and others. As an
example, 0:05 would be caputred in the range 1-5, which I had previously as
"1-5". Also, 0:08 would be captured in the range 6-10, which would be
"6-10". The goal is to assign incremental ranges to the various actual
times. The cell format for the range is [h]:mm, as is the 0:05 cell.
Thanks and look forward to hearing back from you.
"daddylonglegs" wrote:
My suggested formula returns a blank if the time in K1 is not equal to or
between the specified limits.
How is K1 generated, is there a formula in that cell? The actual value may
be slightly above 0:05, e.g. if K1 contains 0:05:01 but the cell is formatted
as h:mm. In this situation the value is above five minutes so the result is
correct.
"Daren" wrote:
Tried it, but it returns a blank. I also tried just 1 & 5 for the times
(e.g., k1=1), but that didn't help either.
"daddylonglegs" wrote:
Try this
=IF(AND(K1="0:01"+0,K1<="0:05"+0),"1-5","")
"Daren" wrote:
I'm trying to use an IF statement for time based data. The data that I'm
evaluating is in the 0:05 time format, which is the same as [h]:mm format in
custom formatting under cell formats.
Here's the scenario. The data in cell k1 is 0:05. I'm trying to evaluate
if this value is greater than or equal to 1 and at the same time less than or
equal to 5. My current logic statement is set as:
=IF(1<=k1<=5, "1-5",false). This returns false.
I've also tried =IF(0:01<=k1<=0:05,"1-5",false), but that results in an error.
Please help.
|