Displaying time

  • Thread starter Thread starter Barbara
  • Start date Start date
B

Barbara

I have a monthly report that needs to add up the number
of hours each person spent on a certain task. Currently
I use the formula =Sum([Adminwork])and format it as short
time. This works fine so long as it is less than 24
hours. But how do I get it to display correctly if it is
more than 24hrs e.g 36 hours. I know that to do this in
Excel I format it as [hh]:[mm]. Thank you.

rgds
barbara
 
Try this:
(Hours is a decimal number of hours)

Int(Hours) & ":" & Format((Hours -int(Hours))*60,"00")

Hours -int(Hours) gives you the decimal part of hours
*60 will convert it into minutes
Format(..."00") will put leading zeroes and round minutes

Milan
 
Back
Top