Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Creating new shifttime

I'm trying to create a new shifttime based on the original shifttime and
some overtime hours.
Let's say somebody works from 07:00 - 15:30 and is doing overtime from
15:30 - 16:30.
The new created shifttime should be displayed as 07:00 - 16:30.
Another example:
Original shift 14:00 - 22:00, overtime 12:00 - 14:00. New created
shifttime should be displayed as 12:00 - 22:00.

A similar question is when you take back some hours from the original
shifttime. For example, original shift 12:00 - 20:00, take back 18:00 -
20:00, new created shifttime should be displayed as 12:00 - 18:00.

Is there a function to accomplish that?

with kind regards,
Bert
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Creating new shifttime

How are your times stored in Excel?

Assuming original shift start/end are columns A & B, with OT start/end in
B&D then for EXTENDED shifts:

new Shift start =MIN(A2,C2)
new Shift end=MAX(B2,D2)

However, I don't know how you represent the reduced shift i.e take back
hours. To use the above formula, and with your example, the OT end time would
be 18:00 (and make OT start time the same i.e. 1800 ?)

HTH

"BBert" wrote:

I'm trying to create a new shifttime based on the original shifttime and
some overtime hours.
Let's say somebody works from 07:00 - 15:30 and is doing overtime from
15:30 - 16:30.
The new created shifttime should be displayed as 07:00 - 16:30.
Another example:
Original shift 14:00 - 22:00, overtime 12:00 - 14:00. New created
shifttime should be displayed as 12:00 - 22:00.

A similar question is when you take back some hours from the original
shifttime. For example, original shift 12:00 - 20:00, take back 18:00 -
20:00, new created shifttime should be displayed as 12:00 - 18:00.

Is there a function to accomplish that?

with kind regards,
Bert

  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Creating new shifttime

On Mon, 7 May 2007 07:02:00 -0700, Toppers wrote...
How are your times stored in Excel?


Oké Toppers, you pushed me in the right direction. But as you pointed
out, the formula gives unpredictable results when used in the takeback
hours. But we can work that around.

All times are stored in single columns (single cells). That way it's
easier to determine if somebody is doing overtime or take back hours (i
don't know how you say that in plain English) and we don't have to
juggle with complicated formula's.

Let's assume this is my layout:
sh stands for shift, ot is overtime, tb is takeback
ST is Starttime, EN is Endtime.

A B C D E F G H
1 shST shEn otST otEN tbST tbEN shST shEN
2 7:00 15:30 6:00 7:00 6:00 15:30
3 12:00 20:00 20:00 23:00 12:00 23:00
4
5 14:00 22:00 21:30 22:00 14:00 21:30
6 13:00 21:00 13:00 13:30 13:30 21:00

Formula's used:
Column G Column H
=IF(A2=D2,C2,A2) =IF(B2=C2,D2,B2)
=IF(A3=D3,C3,A3) =IF(B3=C3,D3,B3)

=IF(A5=E5,F5,A5) =IF(B5=F5,E5,B5)
=IF(A6=E6,F6,A6) =IF(B6=F6,E6,B6)

I think this gets the job done. The only problem is when takeback hours
is within the shift. That would give me a split! Perhaps 2 extra columns
(I:J) would do the trick. Same problem when the overtimes are not
adjacent the shifttimes. Any thoughts.....?

Kind regards,
Bert
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
Creating IF with OR Joe Gieder Excel Worksheet Functions 3 April 19th 07 06:21 PM
creating a pdf Andrew R Excel Discussion (Misc queries) 4 September 19th 06 08:21 PM
Creating Id shail Excel Worksheet Functions 8 September 14th 06 06:30 PM
Really need help creating pop ups mward77095 Excel Discussion (Misc queries) 3 May 8th 06 09:34 PM
Creating ActualSelf Excel Discussion (Misc queries) 1 October 20th 05 08:03 PM


All times are GMT +1. The time now is 05:38 PM.

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

About Us

"It's about Microsoft Excel"