Darren Guess
New Member
- Joined
- Dec 7, 2011
- Messages
- 28
Good Afternoon
I am looking to carry out an 'if' statement to test if a time value is between 2 values and return True or False. I have read around 50 posts today, but cannot find one that deals with values beyond the hours in a day e.g. 24:00.
The closest I have found (and am displaying the modified formula) =IF(AND(HOUR(K1525)>=10,HOUR(K1525)<=100),TRUE,FALSE), but this always returns a false regardless of whether the hours are within the range or not. My values can be anything up to 1000:00 hours. I expect this is because the 'HOUR' function in the formula is to do with hours in the day e.g. 24:00, or should this work for any time value?
My times are formatted in to [HH]:mm formats, so have also tried converting to text etc. and trying to formula from this but again no luck.
Thanks in advance
Darren
I am looking to carry out an 'if' statement to test if a time value is between 2 values and return True or False. I have read around 50 posts today, but cannot find one that deals with values beyond the hours in a day e.g. 24:00.
The closest I have found (and am displaying the modified formula) =IF(AND(HOUR(K1525)>=10,HOUR(K1525)<=100),TRUE,FALSE), but this always returns a false regardless of whether the hours are within the range or not. My values can be anything up to 1000:00 hours. I expect this is because the 'HOUR' function in the formula is to do with hours in the day e.g. 24:00, or should this work for any time value?
My times are formatted in to [HH]:mm formats, so have also tried converting to text etc. and trying to formula from this but again no luck.
Thanks in advance
Darren