View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default comparing time value

Question:

I have 3 working shifts...7a-3p, 3p-11p, and 11p-7a


4/1/2008 7:00:00AM --- "11p-7a"


How do you know that is the 11-7 shift and not the 7-3 shift?

I think you need to adjust your times so that they don't overlap:

7:00 AM to 2:59:59 PM

Or

7:00:01 AM to 3:00 PM


--
Biff
Microsoft Excel MVP


"ml" wrote in message
...
I have 3 working shifts...7a-3p, 3p-11p, and 11p-7a

4/1/2008 1:06:00PM --- this should yield to "7a-3p" shift
4/1/2008 1:13:00AM --- "11p-7a"
4/1/2008 7:04:00PM --- "3p-11p"
4/1/2008 7:00:00AM --- "11p-7a"


I wanted to assign above shift value to the time listed above so that
accordingly. The data I received didn't have the time listed as military
time.

This is what I've written, but it didn't return the right value. Help
please!!!

=IF(B2=" 3:00:00PM","7a-3p",IF(B2<="
7:00:00AM","7a-3p",IF(B2="11:00:00PM","3p-11p",IF(B2<="
3:00:00PM","3p-11p","11p-7a"))))