Two conditions in one cell. Help needed ASAP

M

Marty

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$6>TIME(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?





 
J

Joel

Use the add button in the conditional formating box for your 2nd formula.
enter the same as the 1st box.
 
M

Marty

Joel

Excel 2003 no problem, but how do you do this in 2007 without switching
between the 2?
 
J

jatman

follow below, including cell formats:

- format cells C6 AND D6 as follows: Custom, dd/mm/yyyy h:mm AM/PM OR
similar format for your needs (12 hour clock or 24 hour clock)

- format cell F6 as follows: Custom, [h]:mm

- clear all existing rules in the cell that you want to use.
- From the Home Tab, Conditional Formatting, select New Rule, select use a
formula to determine... and enter the folowing =AND(A6="P",D6-C6>TIME(10,0,0))
- select your color (in this case should be blue), press, ok, apply, ok
- now go back into conditional formatting, select Manage Rules, New Rule...,
select use a formula to determine... and enter the following
=AND(A6="P",D6-C6>TIME(10,0,0))
- select your color (red), press ok, apply, ok,

test


jat
 

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