|  | Shift information |  | |
| | | engteng |  |
| Posted: Thu Jun 05, 2008 7:45 am Post subject: Shift information |  |
How can I write a formula to display shift(1,2,3) in shift column by given time?
Time Shift 08:12:10 ? 15:30:15 ? 23:55:02 ?
Condition Shift 1 is time >= '07:00' AND time < '15:00' Shift 2 is time >= '15:00' AND time < '23:00' Shift 3 is time >= '23:00' AND time < '07:00'
Regards, Tee |
| |
| | | Bob Phillips |  |
| Posted: Thu Jun 05, 2008 8:06 am Post subject: Re: Shift information |  |
="Shift "&IF(A2>TIME(7,0,0),IF(A2<TIME(15,0,0),1,IF(A2<TIME(23,0,0),2,3)),3)
-- --- HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"engteng" <passrcv@gmail.com> wrote in message news:ufAxbDvxIHA.2208@TK2MSFTNGP04.phx.gbl...
| Quote: | How can I write a formula to display shift(1,2,3) in shift column by given time?
Time Shift 08:12:10 ? 15:30:15 ? 23:55:02 ?
Condition Shift 1 is time >= '07:00' AND time < '15:00' Shift 2 is time >= '15:00' AND time < '23:00' Shift 3 is time >= '23:00' AND time < '07:00'
Regards, Tee
|
|
| |
| | | T. Valko |  |
| Posted: Thu Jun 05, 2008 8:16 pm Post subject: Re: Shift information |  |
Another one:
=LOOKUP(HOUR(A2),{0,7,15,23},{3,1,2,3})
Copy down as needed.
-- Biff Microsoft Excel MVP
"engteng" <passrcv@gmail.com> wrote in message news:ufAxbDvxIHA.2208@TK2MSFTNGP04.phx.gbl...
| Quote: | How can I write a formula to display shift(1,2,3) in shift column by given time?
Time Shift 08:12:10 ? 15:30:15 ? 23:55:02 ?
Condition Shift 1 is time >= '07:00' AND time < '15:00' Shift 2 is time >= '15:00' AND time < '23:00' Shift 3 is time >= '23:00' AND time < '07:00'
Regards, Tee
|
|
| |
|
|