Calculating time format

bosstec

New Member
Joined
Jun 23, 2011
Messages
12
I have some small problem with time formulas. I need to calculate how many hours between start and stop of working time. Including extended hours (night hours).
Please see my example. The link is directed to my homepage where the file can be downloaded.

http://www.dasfoto.dk/mrexcel

Thanks

Reg Frank
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello Frank,

I believe the formulas shown below should work.
The formulas use named ranges for the Normal Start/Stop to make the formula easier to follow.
It also allows you to change your Normal Hours without changing the formulas.

Excel Workbook
ABCDEFG
1StartStopTotal hoursNormal hoursExtended hours
207:0017:0010100
34:0015:001192
412:0023:3011.5110.5
512:002:0014113
64:3023:1518.75171.75
74:300:3020173
8Roules:
9nStartnStopNormal hour is between 06:00 - 23:00
106:0023:00Extended hour (night) is between: 23:00 - 06:00
11
Sheet1
#VALUE!
</td></tr></table></td></tr></table>

The formulas are built on the assumption that the difference between Start and Stop time on any row does not exceed 24 hours.
 
Last edited:
Upvote 0
Thank you, Thank you, Thank you...

It is woorking..!

Can you explain why the formula in D2 is working :eeek:

Reg Frank
 
Upvote 0
Ups I found a problem...

If start time is 23:30 and stop time is 08:00 then the result should be:

Total hours: 8,5 (ok)
Normal hours: 2 (showing 0)
Extended hours: 6,5 (showing 8,5)

Can anyone help with this?

Thanks
Reg Frank
 
Upvote 0
Ups I found a problem...

If start time is 23:30 and stop time is 08:00 then the result should be:

Total hours: 8,5 (ok)
Normal hours: 2 (showing 0)
Extended hours: 6,5 (showing 8,5)

Oh, you want it to work for any combination of times entered not just the ones in your example? That's harder.. :laugh:

I think (hope) the revised formula below will do that.

You'll see a few other tricky combinations that wouldn't have worked with my first formula.

Excel Workbook
ABCDEFG
1StartStopTotal hoursNormal hoursExtended hours
207:0017:0010100
34:0015:001192
412:0023:3011.5110.5
512:002:0014113
64:3023:1518.75171.75
74:300:3020173
823:308:008.526.5
923:4523:3023.75176.75
1023:450:000.2500.25
1112:0011:0023167
120:0023:4523.75176.75
13Roules:
14nStartnStopNormal hour is between 06:00 - 23:00
156:0023:00Extended hour (night) is between: 23:00 - 06:00
16
Sheet1
#VALUE!
</td></tr></table></td></tr></table>
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,181
Members
452,893
Latest member
denay

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