View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Time - How do you see if a time value is between 2 values?

Not sure that I really understand but this might put you on the right track
when trying to format based on between 2 values using AND function:-

Example1:-
=AND($E$5<$E$4,$E$5$F$4)


Example2:-
=AND($F$5<$E$4,$F$5TIME(7,0,0))


Regards,

OssieMac




"Waitsu" wrote:

I want to perform a conditional formating in Excel that says:

If the time is between 07:00 and 13:59 then turn the cell border red and
turn the font red.

if the time is between 14:00 and 07:00 turn the cell green.
Condition 1
This works to turn the cell green: =$F$4<=$E$4

Condition 2
This works to change the font red: =$F$4=$E$4

Condition 3
This does not turn the cell green: =$F$4TIME(14,0,0)


Does anyone have any idea on how can I code this so that it will work?

Thanks