# Convert non-military time to tenths of hours

1. ## Convert non-military time to tenths of hours

I am constucting a time sheet that is driving me nuts. The following formula calculates the employees total time worked in one day (it works fine). The input cells (time in/out) are time formated. The total hours worked cell (which has the formula below in it) is formated as number w/2 decimal places. I can not come up with the correct formula to convert the decimals to tenths of hours and have it match my companies conversion chart. What do I need to do? Thank you to anyone who can help me.

TOTAL HOURS WORKED:
'=IF((OR(B15="",B14="")),0,IF((B15<B14),((B15-B14)*24)+24,(B15-B14)*24))+IF((OR(C15="",C14="")),0,IF((C15<C14),((C15-C14)*24)+24,(C15-C14)*24))+IF((OR(E15="",E14="")),0,IF((E15<E14),((E15-E14)*24)+24,(E15-E14)*24))+IF((OR(F15="",F14="")),0,IF((F15<F14),((F15-F14)*24)+24,(F15-F14)*24))

HOURS CONVERSION CHART (Sample)

0 min - 2 min, 59 seconds = .0
3 min - 8 min, 59 seconds = .1
9 min - 14 min, 59 seconds = .2
15 min - 20 min, 59 seconds = .3  Register To Reply

2. ## Re: Convert non-military time to tenths of hours

If A1 contains an Excel time, then =ROUND(A1 * 240, 0)/10 gives the time in decimal hours to the nearest tenth. Format the result as 0.0  Register To Reply

3. ## Re: Convert non-military time to tenths of hours

Slight variation on that would be

=ROUND(A1*24,1)

so to apply that to your formula try

=ROUND((IF(COUNT(B14:B15)=2,MOD(B15-B14,1))+IF(COUNT(C14:C15)=2,MOD(C15-C14,1))+IF(COUNT(E14:E15)=2,MOD(E15-E14,1))+IF(COUNT(F14:F15)=2,MOD(F15-F14,1)))*24,1)

Note: this rounds the final count of minutes for the day rather than rounding each individual section and then adding those......which isn't quite the same thing......  Register To Reply

4. ## Re: Convert non-military time to tenths of hours

I've tried all the suggestions and the formula's are not working correctly. I've attached a sample of the time sheet and the conversion chart. I need Sunday to equal 6.9 and Monday to equal 6.4 in the Conversion From Time to Hours column. BTW, I can't use military time to input the hours worked.

Thanks everyone for your help. I feel like a real dummy on this one.  Register To Reply

5. ## Re: Convert non-military time to tenths of hours

Why 6.9 for Sunday and 6.4 for Monday?

Sunday has a total of 6 hours 57 minutes which will round to 7 hours given your rounding criteria. Monday has 6 hours 39 minutes which would round to 6.7

If you use the formula I suggested then those are the results you'll get.....  Register To Reply

6. ## Re: Convert non-military time to tenths of hours

Slight variation on that would be =ROUND(A1*24,1)   Doh!  Register To Reply

7. ## Re: Convert non-military time to tenths of hours

I agree but my companies conversion chart is not standard rounding as you can see from the chart. 3 min - 8 min, 59 sec = .1 for Sunday and 21 minutes to 26 min, 59 sec = .4 for Monday.

And if I use the formula =ROUND(A1*24,1) in Sunday I get 166.8

Anybody have a glass of wine?  Register To Reply

8. ## Re: Convert non-military time to tenths of hours Originally Posted by kwray49 I agree but my companies conversion chart is not standard rounding as you can see from the chart. 3 min - 8 min, 59 sec = .1 for Sunday and 21 minutes to 26 min, 59 sec = .4 for Monday.

And if I use the formula =ROUND(A1*24,1) in Sunday I get 166.8

Anybody have a glass of wine?
In fact that is "standard rounding". If you round to the nearest 10th of each hour then anything from 3 mins up to (but not including) 9 mins will round to 0.1.

If you already have your formula in column G then you have already converted to decimal so you don't need *24. You could simply use this formula in H4 copied down

=ROUND(G4,1)

That will give you 7.0 for Sunday and 6.7 for Monday which looks correct to me.

My previous suggestion does the calculation of hours and the rounding all in one go so that you don't need both columns G and H, i.e. you can use this formula in G4

=ROUND((IF(COUNT(B4:B5)=2,MOD(B5-B4,1))+IF(COUNT(C4:C5)=2,MOD(C5-C4,1))+IF(COUNT(E4:E5)=2,MOD(E5-E4,1))+IF(COUNT(F4:F5)=2,MOD(F5-F4,1)))*24,1)  Register To Reply

9. ## Re: Convert non-military time to tenths of hours

BTW, I can't use military time to input the hours worked.
that doesnt matter 23:00 is the same as 11:00 pm just the cell format is different ,the underlying value is the same
but
6.65 hours even according to your chart rounds to 6.7 as 0.65 hrs falls in between
39 and 45  Register To Reply