How do I convert date and time into shift worked?
Joel, thanks for the help. The function you provided will not do what I am
looking for. I am looking to relate a date and time to a shift worked
(A/C/E/F). All I have is the date and time, so I need a function that will
reference both and then give the shift worked output. This needs to be a
function that I can copy down a column.
Example:
B3=8/19/2007
C3=8:30:00 AM
D3= Shift worked
This is Sunday between 07:00 and 19:00 so output should be "A Shift"
If the time were Sunday @ 19:01, the output should be "E Shift"
Can you help set something like this up?
"Joel" wrote:
To convert a date and time to a text string use the TEXT function
MyTime = Text(A1,"HH:MM:SS")
MYDate = Text(A2,"MM/DD/YY")
or
MYDate = Text(A2,"MM/DD/YYYY")
You can make your own custom format. The function uses your own separator
like /,.: and just substitues the HH,MM,SS,DD,YY,YYY with actual values.
"Dan" wrote:
I need to convert a date and time into a specific letter. I have the date is
in one column and the time is in another, and need a letter output in a third
column. I need the conversion to look something like this:
Every Sunday,Monday,Tuesday from 07:00 to 19:00= A
Every Sunday,Monday,Tuesday from 19:00 to 07:00= E
Every other Wednesday from 07:00 to 19:00 toggles between A and C
Every Thursday,Friday,Saturday from 07:00 to 19:00= C
Every Wednesday,Thursday,Friday from 19:00 to 07:00=F
Every other Saturday from 19:00 to 07:00 toggles between A and C
|