Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert two times to "Hours Worked"
Is there an easy way to convert 8:35 AM to 4:30 PM into the total number of
hours worked? Without changing it into 8:35 and 16:30 and then splitting the numbers apart and doing the math? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert two times to "Hours Worked"
Hi HotRod,
Apologies -momentary abberation! Should have been: Sub Test10() Dim TotalHours As Double Dim start As Double, finish As Double finish = #4:30:00 PM# start = #9:30:00 AM# TotalHours = (finish - start) * 24 MsgBox TotalHours End Sub --- Regards, Norman "Norman Jones" wrote in message ... Hi HotRod, Sub Test10() Dim TotalHours As Double Dim start As Double, finish As Double finish = TimeValue("4:30PM") start = TimeValue("9:30") TotalHours = (finish - start) * 24 MsgBox TotalHours End Sub "HotRod" wrote in message ... Is there an easy way to convert 8:35 AM to 4:30 PM into the total number of hours worked? Without changing it into 8:35 and 16:30 and then splitting the numbers apart and doing the math? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert two times to "Hours Worked"
Ended up doing it the hard way by splitting it and then putting it back
together but I'll give this a try as well. THANKS |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Convert two times to "Hours Worked"
Hi HotRod,
Sub Test10() Dim TotalHours As Double Dim start As Double, finish As Double finish = TimeValue("4:30PM") start = TimeValue("9:30") TotalHours = (finish - start) * 24 MsgBox TotalHours End Sub "HotRod" wrote in message ... Is there an easy way to convert 8:35 AM to 4:30 PM into the total number of hours worked? Without changing it into 8:35 and 16:30 and then splitting the numbers apart and doing the math? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trying to calculate hours worked on timecard using "IF" command | Excel Worksheet Functions | |||
any formula to convert numbers in word form, e.g. "2" as "Two"? | Excel Worksheet Functions | |||
how i convert "100" to "hundred"( number to text) in excel-2007 | Excel Worksheet Functions | |||
In Excell how can i get a total hours worked value from 2 times? | Excel Worksheet Functions | |||
convert "15000" to "Fifteen thousand" in excel cell? | Excel Worksheet Functions |