Need a formula "if c2>c3 and c4"

E

EduardoDon

I wish to set
if C2 >C3 and C4 ,
then the cell's background will change in color.

I dont know how to set the formula correctly,
while the latter is known to me.

Please help.
Thanks in advance.

Eduardo D
 
E

EduardoDon

Dear DDM,

for:

if c2> c3 and c4
=AND(c2>c3,c2>c4) works perfect

but when:

condition i)
b4<b3 set to color"x"

condition ii)
if b4<b3 and b2
=AND(b4<b3,b4<b2) intended to be in color "y"

wont work, only color "x" shown ?


What should the the correct formula for the latter, then ??
Eager to receive an instruction.

Thanks in advance.


EduardoD
 
D

DDM

EduardoDon, the problem lies with your logic, not with the formula. If
condition (i) is true, Excel will display color "x" and look no farther. If
condition (i) is false, then both conditions are false. So color "y" will
never be displayed. Two possibilities:

1-reverse the conditions so condition (i) is (ii) and (ii) is (i). The
formula will work just fine as written. or...
2-change condition (i) to =AND(B4<B3,B4>=B2). Condition (ii) is
=AND(B4<B3,B4<B2).

Both worked for me in light testing.

DDM
"DDM's Microsoft Office Tips and Tricks"
www.ddmcomputing.com
 
E

EduardoDon

Dear DDM,

Reversing the conditions wont fit me,

while your second choice just made it.


There are guiding angels all around,
and I am fortunate enough to have met one.

Thank you.

EduardoD.
 
C

CLR

You might try reversing your logic on condition ii.........change from
=AND(b4<b3,b4<b2)
to =AND(B4<B2,B4<B3)............I should imagine that when using multiple
conditions, once the first condition (condition i) is met, the rest is
ignored.........

Vaya con Dios,
Chuck, CABGx3
 
Top