Time values in Excel

Time values in Excel

Didn't find your answer?

I've posted this question before, but need to update my formula...

I take times from a TA system (overtime) in hours and minutes and need to convert them to hours and decimal of an hour: 1:30 = 1.5, 1:20 = 1.33 etc. I enter the hours and minutes as a decimal for expediency, so 1:30 is entered as 1.30.

The formula I am currently using is: =ROUND(INT(TIME(INT(G6),(G6-INT(G6))*100,0))*24+HOUR(TIME(INT(G6),(G6-INT(G6))*100,0))+ROUND(MINUTE(TIME(INT(G6),(G6-INT(G6))*100,0))/60,2),2)

The problem is that this formula works on a 24 hour period: 23:59 entered as 23.59 is converted to 23.98, which is fine, but 24.00 becomes 0.00, 25.00 becomes 1.00 - basically anything of 24hrs or greater goes astray. However, in one month employees could be working in excess of 24 hours of overtime.

How do I amend the formula so that Excel simply recognises 00.00 as hours and minutes as opposed to some representation of the 24 hour day?

Thank you in advance.

Replies (3)

Please login or register to join the discussion.

avatar
By NHGlos
23rd Jun 2015 11:06

Actually...

Actually, thinking about it, would =ROUND(((G1-INT(G1))*100)/60,2)+INT(G1) be sufficient?

Thanks (0)
pic
By jndavs
23rd Jun 2015 11:40

Yes, that should do it
or you can use the mod and quotient functions.

Thanks (0)
By Onion4Sage
23rd Jun 2015 14:06

Calculate in days and format the answer.

Hi NHGlos,

One way of doing this is to calculate the amounts in fractions of days and format the cell containing the value as [h]:mm:ss. The cell will display 1.5 days as 36:00:00

Something to work with?

Regards,

Ian

Ian Brown FCA
Onion Reporting Software Ltd

www.onionrs.co.uk

Comprehensive Sage reporting packs in Excel to go. No set-up necessary.

 

Thanks (0)