Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Chris Strug
 
Posts: n/a
Default Deducting breaks from time measurements

Hi,

First part pretty simple. Column A = Start Time, Column B = End Time. As
times always occur in the same day then to find the time spent is a simple
"B-A".

However for the next part...

I wish to be able to deduct break times from the time spent.

If we have three breaks a day between say
10:00 - 10:30
12:30 - 13:30
14:30 - 15:00

then if any of these intervals occur between the start time and end time
then i would like to deduct the period of the break (i.e. 30 mins or 1
hour).

I could probably achieve this using lots of nested IFs and lookups but I was
wondering if there was an easier way?

Any and all advice is gratefully received.

regards

Chris.


  #2   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi Chris

The following is definitely not pretty, and I am sure there is a simpler
way, but this returns the correct answers in decimal hours
=(B12-A12-(--AND(A12<TIME(10,0,0),B12TIME(10,30,0))*30/1440)-(--AND(A12<TIME(12,30,0),B12TIME(13,30,0))*60/1440)-(--AND(A12<TIME(14,30,0),B12TIME(15,0,0))*30/1440))*24

Regards

Roger Govier



Chris Strug wrote:

Hi,

First part pretty simple. Column A = Start Time, Column B = End Time. As
times always occur in the same day then to find the time spent is a simple
"B-A".

However for the next part...

I wish to be able to deduct break times from the time spent.

If we have three breaks a day between say
10:00 - 10:30
12:30 - 13:30
14:30 - 15:00

then if any of these intervals occur between the start time and end time
then i would like to deduct the period of the break (i.e. 30 mins or 1
hour).

I could probably achieve this using lots of nested IFs and lookups but I was
wondering if there was an easier way?

Any and all advice is gratefully received.

regards

Chris.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Time Manipulation BFiedler Excel Discussion (Misc queries) 0 September 15th 05 01:15 AM
conditional formatting with time values Access Idiot Excel Discussion (Misc queries) 2 September 13th 05 03:29 PM
Formula to deduct unpaid breaks in time sheet Rick Excel Discussion (Misc queries) 3 August 26th 05 11:53 PM
Time Sheets smiller3128 New Users to Excel 1 August 4th 05 08:17 PM
unmet challenge boris Excel Worksheet Functions 2 March 16th 05 02:13 PM


All times are GMT +1. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"