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

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
are the columns used the same as the formula above from Aryatect
user-offline.png
 
Upvote 0
are the columns used the same as the formula above from Aryatect
user-offline.png

No my columns are as follows:

The time stamp is in cell: BH6

My chart that looks like this Starts in cell CN4 :

CN CO CP
4 Shift Start Time End Time
5 First 6:21:00 14:20:00
6 Second 14:21:00 22:20:00
7 Third 22:21:00 6:20:00


the word first second or third should go in cell BI6
 
Last edited:
Upvote 0
just a thought but i think the date needs to be dropped i the formula otherwise they will never work :)
 
Upvote 0
just a thought but i think the date needs to be dropped i the formula otherwise they will never work :)

Code:
=IF(AND(BH6>=$CO$5,BH6<=$CP$5),$CN$5,IF(AND(BH6>=$CO$6,BH6<=$CP$6),$CN$6,IF(AND(BH6>=$CO$7,BH6<=0.99999),$CN$7,IF(AND(BH6>=0,BH6<=$CP$7),$CN$7))))

Okay just changed the format to just the time instead of date and time and this formula is still giving me a false instead of a shift name..
 
Upvote 0
i was thinking more on the INDEX / MATCH formula but using this formula (adjusted to remove the date) > =A2-INT(A2) The date portion is a whole number so this just leaves the time value

Like This >
Excel Workbook
ABCDE
1TimeShift17:25
200:00:00Third
306:21:00First
414:21:00Second
522:21:00Third
6Second
7
8CPCN
9colcol
Sheet1




 
Last edited:
Upvote 0
using your stated locations >
Excel Workbook
BHBIBJCMCNCOCP
2
3ShiftTime
4Third00:00:00
5First06:21:00
617:25SecondSecond14:21:00
7Third22:21:00
Sheet1
 
Upvote 0
i was thinking more on the INDEX / MATCH formula but using this formula (adjusted to remove the date) > =A2-INT(A2) The date portion is a whole number so this just leaves the time value

Like This > Sheet1

ABCDE
1TimeShift 17:25
200:00:00Third
306:21:00First
414:21:00Second
522:21:00Third
6 Second
7
8CPCN
9colcol

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:81px;"><col style="width:73px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
E6=IFERROR(INDEX($B$2:$B$5,MATCH(E1-INT(E1),$A$2:$A$5,1)),"ERROR")

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4




This worked!! Thank you so much!!
 
Upvote 0
just a matter of getting the right info from the right places :) The updated version should fit with your data
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,051
Latest member
excelquestion515

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