Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / June 2005

Tip: Looking for answers? Try searching our database.

time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andrewkerr84@hotmail.com - 24 Jun 2005 12:52 GMT
can anybody help with time? i want to convert minutes into hours and
minutes.  for example i want to convert 7245 minutes into 120h 45m or
120:45, can't divide 7245 by 60 because that gives 120.75 which is no
good to me.
i've looked at the time formats but they don't seem to help, first of
all they won't recognise anything above 24 hours - i guess because
actual clock time doesn't go above this, i'm not looking at clock time
however - i'm working with lengths of time.

would really appreciate some advice.

thanks

andrew
JE McGimpsey - 24 Jun 2005 13:00 GMT
XL stores times as fractional days, so to convert integer minutes to an
XL time, the number needs to be divided by (24*60):

A1:     7245
A2:     =A1/1440

Format A2 with  

   Format/Cells/Number/Custom  [h]:mm

which will keep the hours from "rolling over" ever 24 hours.

> can anybody help with time? i want to convert minutes into hours and
> minutes.  for example i want to convert 7245 minutes into 120h 45m or
[quoted text clipped - 6 lines]
>
> would really appreciate some advice.
andrewkerr84@hotmail.com - 24 Jun 2005 14:24 GMT
thanks for that, it worked well. i should have asked before but now
i've got my time in hours and minutes, how do i get it back into just
minutes.
for example if i've got 23 hrs 35 mins as 23:35 how do i convert it
into just minutes i.e. 1415 mins?

thanks

andrew
JE McGimpsey - 24 Jun 2005 14:52 GMT
Multiply it by 1440 and format as General or another number format.

> thanks for that, it worked well. i should have asked before but now
> i've got my time in hours and minutes, how do i get it back into just
[quoted text clipped - 5 lines]
>
> andrew
Anne Troy - 24 Jun 2005 13:05 GMT
I yoinked this UDF from a reply Ken Snell made to someone else.

Public Function ConvertTimeFractionToHM(dblTimeFraction As Double) As String
Dim intHour As Integer
intHour = Int(dblTimeFraction)
ConvertTimeFractionToHM = CStr(intHour) & ":" & Format((dblTimeFunction -
intHour) * 60, "00")
End Function

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com

> can anybody help with time? i want to convert minutes into hours and
> minutes.  for example i want to convert 7245 minutes into 120h 45m or
[quoted text clipped - 10 lines]
>
> andrew
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.