View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Daren Daren is offline
external usenet poster
 
Posts: 162
Default IF statement for time based data

Tried that also but it doesn't work when I assign it as the upper control
boundary (i.e. k1<=0.00347. It's still returning false

"David Biddulph" wrote:

If it doesn't work for you, then I guess that your data in K1 is not
actually a time, but text. If it's really a time, then if you change the
format temporarily to Number it'll show was 0.00347222222222222
--
David Biddulph

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