Use timestamp to identify work crew. 4 crews working week on, week off and rotating day and night.

Status
Not open for further replies.

MattyJimmy

New Member
Joined
Apr 20, 2018
Messages
5
I receive a report which details the time a truckload of material was dumped as a timestamp. I am wanting to write a formula which interrogates the timestamp and can then identify which work crew was on shift at the time the load was dumped. Shift details are as follows:

4 crews: A, B, C, D. Each works 7x12 hour shifts, then goes on break. If a crew is working day shift for 7 days, they go on break for 7 days but not 7*24 hours, as they come back in on night shift after their break, with their counterparts coming back in on day shift.

Whilst they were on break, the other two crews were working day shift/night shift. example below:

On 28 March at 07:00, A crew started their 7 day swing. Working from 07:00 until 18:59:59, at 19:00 B crew started shift, working through until 06:59:59 the following day.

These crews continued to rotate until B crew finished night shift at 06:59:59 on 05 April. Both A and B crew then went on break.

At 07:00 on 05 April, D crew started shift, they worked until 18:59:59, at 19:00, C crew started shift, working through until 06:59:59 the following day.

and so on. The trick bit is when C and D crew go on break, B crew comes in on Day shift, with A crew coming back in on night shift.

Wow, thanks for reading this far! I figure I should be able to divide the timestamp by a number, and then depending on if the result is between a range of values we should be able to see what two crews are working, i.e. A/B or C/D, but am not sure how to identify it down to the crew on day or night shift, especially seeing as they go from days to nights to days and so on.

Any help would be greatly appreciated.

Cheers,

Mat

P.S. This data is then sucked into a PowerQuery query, so if it is easier to sort out in PowerQuery please let me know! :)
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it.
Please be patient and do not attempt to post the question again.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,213,497
Messages
6,113,999
Members
448,541
Latest member
iparraguirre89

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