If statement comparing times

G

GoBrowns!

Hi;

I am trying to write a formula that will let me compare times and assign a
shift value (1st or 2nd Shift) based on that..... and I can't get it to work.

Here is my current forumla:

=IF(AND($S2>TIME(4,0,0),($S2<TIME(15,0,0))),"1st Shift","2nd Shift")

Which is supposed to say that if the time in S2 is greater than 4:00AM and
less than 3:00PM, it is 1st Shift, else it is 2nd Shift.

The value is S2 is formatted as "6:00", and is a copy of another cell that
is formatted "06/25/2009 06:00". The only value that this formula will return
- for all values - is "2nd Shift."

How to fix? Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top