Creating Time Shifts

  • Thread starter Thread starter DM
  • Start date Start date
D

DM

Hi,

My data sheet contains information on start times of
incidents and what i need to do is say if the start time
is from midnight to 6:am then this began during shift 1.
If the incident started between 6:01am and 12:00pm, then
this was during shift 2 12:01 - 6:00pm shift 3 etc
etc....so the end result would be start times broken into
6 hr blocks...by day...

Thank you so much,

DM
 
="Shift " & INT((A1-TIME(0,0,1))*4)+1

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi,

With your start time in A1:

=MATCH(A1*1440,{0;361;721;1081})

N.B: There are 1440 minutes in a day.

Regards,

Daniel M.
 
Hmm...

I have two different solutions here...which one is best??

="Shift " & INT((A1-TIME(0,0,1))*4)+1

=MATCH(A1*1440,{0;361;721;1081})
 
There is no 'best' per se, there are faster/slower, simpler/harder to
understand, so it's up to you to decide which you like/understand more.

Note that mine adds the text 'Shift' at the start, Daniel's does not. Either
could be adapted to work the other way.

You're lucky you only got 2<vbg>.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top