Formatting times when hours is greater than 24

PeterCol

New Member
Joined
Jun 26, 2003
Messages
18
I want to add a column of hours and minutes to give a result in hours and minutes so that if the total was 123 hrs and 30 mins it would display as 123:30. Excel allows this but I can't find a way of doing this in access - the maximum hours allowed seems to be 24. Is there a work around?

Thanks
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You could read the left 2 characters (hours) of all the times with
left(time_variable,2)
and then add the numbers you get.
You could then add all the right hand (minute) characters of all the times using
right(tim_variable).

Then calculate the number of hours that your minutes total is (trivial) and the remainder. Add the total to your previous hours total and you should be able to combine the 2 totals to make a new totals time.
 
Upvote 0
I can get the same result by multiplying by 24, however that does not leave me with hrs and minuts and formatting the number brings me back to the original problem.
 
Upvote 0
I think that you will have to build a function to display the format for you.

=int(MyHours*24) & ":" & int(((MyHours*24) - int(MyHours*24))*60)


I have not tested this formula and you may need to combine the Format fuction as well!

Peter
 
Upvote 0

Forum statistics

Threads
1,221,657
Messages
6,161,084
Members
451,684
Latest member
smllchng5

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