Displaying time

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
 
M

Milan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

TIME CALCULATION 5
How to sum negative times 2
Excel Convert Datetime Stamp to HH and MM Worked 7
Computing Elapsed Time 4
Field Formatting 3
Excel Sumproduct 0
now() Date and Time Formatting 2
Calculate Time in A Report 5

Top