# Thread: More Problems With Time

1. ## More Problems With Time

This is one of my formula's: =IF(B12=2;F12;IF(AND(B12=1;F12<>"");IF(F12<0.25;1; F12-0.25);""))

As you can see if F12 is greater than 0.25 then its F12-0.25 which basically is if I work more than 6 hours then its overtime. My hours are going to change soon to 7 hours a night as standard so is there an easier way to write the formula than figure out what 7 hours is as a decimal?

Thanks in advance for any suggestions.

Alan

2. Excel uses days as the unit of time. So you can use 7/24 for the hours in terms of day (the decimal time). [The 0.25 you were using is = 6/24]

Steve

3. Originally Posted by sdckapr
Excel uses days as the unit of time. So you can use 7/24 for the hours in terms of day (the decimal time). [The 0.25 you were using is = 6/24]

Steve
I knew that Steve, just wondered if there was another way to get the same result. I mean the decimal of 7/24 is 0.29166666666. I guess I will have to change the formulas to use that.

4. That is the decimal, but the formulas can accept the formula which may make it more clear...

=IF(B12=2;F12;IF(AND(B12=1;F12<>"");IF(F12<7/24;1; F12-7/24);""))

You could even store the hours (7) in a cell and use that cell reference in the formula, so you only have to change the hours in one place in the workbook...

Steve