View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Marty Marty is offline
external usenet poster
 
Posts: 116
Default Two conditions in one cell. Help needed ASAP

Help on the below is needed, PLEASE

A6 is either to be the letter W or P only.
B6 is blank
C6 is strart date and time
D6 is end date and time
E6 blank
F6 is D6-C6 with the conditional format =AND($A$6="w",$F$6TIME(7,0,0))+$F$6
applied. Therefore if W is entered in A6 the difference in F6 will be
highlighted in red if more than 7 hours difference. Above works well BUT if I
want to use the same cells as above but instead of a W I now add the letter P
in A6 and I want cell F6 to now be highlighted blue but only if difference is
more than 10 hours.
I need both options in the above cells to work depending on which letter is
added in A6

To sum up: W =red if more than 7 hours difference
P =Blue if more than 10 hours diffenence

Clear as mud?






=AND($A$6="w",$F$6TIME(7,0,0))+$F$6
=AND($A$6="p",$F$6TIME(10,0,0))+$F$6