Calculating Time

chegra26

Board Regular
Joined
Jun 7, 2014
Messages
90
I have a a database that calculates time
My fields are
BeginTime
EndTime
TotalTime

BeginTime1
EndTime1
TotalTime1

BeginTime2
EndTime2
TotalTime2

TotalTimeCal - Sum of Total Time + TotalTime1 + TotalTime2
This calculation shows the sum of the three totals in hours and minutes, for example 7:33 (7 hours 33 minutes)
How do I get this total to display 7.5?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I have the following formula
-Int(-(TimeValue([TotalTimeTotal])*24)/0.25)*0.25
However, it rounds 5.33 up to 5.75 instead of 5.5
 
Upvote 0
apples and pears you can't just switch decimal with time and expect it to behave nicely 5.33 won't round to 5.75, whereas 5:33 might. If you have a natural time in one location, just point your new location to it and change the format to decimal, then you can display both
 
Upvote 0
I came up with round(cdbl(timevalue("07:33"))*24*4)/(24*4)*24
the 24*4 because that's the number of 15 minute intervals in a day, and the last 24 to get it back into hours.
This appears to be accurate to within about a minute (i.e., when we are talking about times right in the middle such as 7:37.5). Not sure if I like this yet!
 
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,190
Members
451,752
Latest member
majbizzaki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top