# Thread: Time in minutes and seconds (2K3)

1. ## Time in minutes and seconds (2K3)

This is more a question of semantics as I am trying to find the easiest option. I have created a workbook that converts the times of my runs from hours, minutes and seconds to minutes and a decimal i.e. 1 hour 35 minutes and 23 seconds = 95.38 minutes. This is to allow me tocalculate calories burned, speed and effort calculations.

I have been playing around with a very basic function and also built in functions and just wanted to see if what I have done could be problematic or if there are any tidier methods.

Method 1
A function

Function runTime(Hr As Integer, Mn As Integer, Sc As Double)

runTime = (Hr * 60) + Mn + Round((Sc / 60), 2)

End Function

Method 2
Built-in function

=TIME(A2,B2,C2)*1440

Any views/ideas?

2. ## Re: Time in minutes and seconds (2K3)

Built-in functions are much more efficient than user-defined functions, so method 2 is preferable, but in reality you won't notice the difference since the amount of data and formulas will be (relatively) small.

Method 3: enter the time in cell A1 formatted as hh:mm:ss, enter the formula =A1*1440 in cell B1 and format cell B1 as a number with 2 decimals.

3. ## Re: Time in minutes and seconds (2K3)

Yep, makes sense, I just get fed up with the formatting of the colon <img src=/S/sad.gif border=0 alt=sad width=15 height=15>

4. ## Re: Time in minutes and seconds (2K3)

I'd use method 2 then. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•