Shift name based on timestamp

Dscalf1

New Member
Joined
Jun 14, 2015
Messages
41
Hello I am trying to get a shift name based on a timestamp in a different cell. For example if my timestamp says "6/19/2019 13:41:37" I want the word "First" to show up in the next column to identify the shift name. I have searched and searched for an answer to this and cant seem to find it... The shift times are: First: 6:21-14:20, Second: 14:21-22:20 third: 22:21-6:20.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
are there any other overlays that need to be considered, otherwise its a case of extracting the right hand time value and comparing to less than 1
 
Upvote 0
are there any other overlays that need to be considered, otherwise its a case of extracting the right hand time value and comparing to less than 1

Im not exactly sure what youre asking but essentially the times wouldnt overlap so for example.. 6:20:59 would be third shift and as soon as 6:21:00 hit it would be first shift
 
Upvote 0
Hi Dscalf1,

I put all the Shift timings and shift in the excel starting with A1 shown below:

ShiftStart Time End Time
First6:21:0014:20:00
Second14:21:0022:20:00
Third22:21:006:20:00

<tbody>
</tbody>

and then put my time stamp in cell F2 and used below formula in G2

Code:
=IF(AND(F2>=$B$2,F2<=$C$2),$A$2,IF(AND(F2>=$B$3,F2<=$C$3),$A$3,IF(AND(F2>=$B$4,F2<=0.99999),$A$4,IF(AND(F2>=0,F2<=$C$4),$A$4))))

Let me know if it works for you.

Thanks

Hello I am trying to get a shift name based on a timestamp in a different cell. For example if my timestamp says "6/19/2019 13:41:37" I want the word "First" to show up in the next column to identify the shift name. I have searched and searched for an answer to this and cant seem to find it... The shift times are: First: 6:21-14:20, Second: 14:21-22:20 third: 22:21-6:20.
 
Last edited:
Upvote 0
Another easier option would be:

putting the column starting with A1 again:

TimeShift
0:00:00 Third
6:21:00 First
14:21:00 Second
22:21:00 Third

<colgroup><col><col></colgroup><tbody>
</tbody>

then putting time stamp in E2 and putting below formula in F2:

Code:
=INDEX($B$2:$B$5,MATCH(E2,$A$2:$A$5,1))

This should be a simple one.

Im not exactly sure what youre asking but essentially the times wouldnt overlap so for example.. 6:20:59 would be third shift and as soon as 6:21:00 hit it would be first shift
 
Upvote 0
Another easier option would be:

putting the column starting with A1 again:

TimeShift
0:00:00Third
6:21:00First
14:21:00 Second
22:21:00 Third

<tbody>
</tbody>

then putting time stamp in E2 and putting below formula in F2:

Code:
=INDEX($B$2:$B$5,MATCH(E2,$A$2:$A$5,1))

This should be a simple one.

This one did not work for me it is showing an N/A but I think the first answer was going to work its just taking me a while to convert to the cells Im using! Ill let you know!
 
Upvote 0
Another easier option would be:

putting the column starting with A1 again:

TimeShift
0:00:00Third
6:21:00First
14:21:00 Second
22:21:00 Third

<tbody>
</tbody>

then putting time stamp in E2 and putting below formula in F2:

Code:
=INDEX($B$2:$B$5,MATCH(E2,$A$2:$A$5,1))

This should be a simple one.

This returned false for me...
 
Upvote 0
are you using actual time values? or text that looks like time?
 
Upvote 0
if you in another cell use = ISNUMBER(your cell date time value) and it returns as true then it is time, false will say it is text
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,559
Members
448,970
Latest member
kennimack

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