Two Conditions

X

Xandlyn

Okay I need help. Seems easy but I can't figure out the formula.

I want to have one cell change only when two specific conditions apply.

Example:
B2 will change color if B1=text and A2=2

Thank you!!
 
X

Xandlyn

I'm sorry I tried conditional formatting and I am not getting the formula
correct as it is giving me errors. Do you by chance know the proper formula
for two conditions like the example I gave?
 
B

BenjieLop

Xandlyn said:
Okay I need help. Seems easy but I can't figure out the formula.

I want to have one cell change only when two specific conditions
apply.

Example:
B2 will change color if B1=text and A2=2

Thank you!!

Go to Format/Conditional Formatting
On the "Condition 1" box, choose "Formula Is"
On the next box to the right, enter (without the quotes) this formula

*=and(A2=2,istext(B1))*

Click "Format"
On the "Color" box (located somewhere in the middle), choose which
color you like B2 to be
Click "OK"
Click "OK"
 
V

Vacation's Over

=T(B1) will return "" if no text is present otherwise it will return the text
so you can nest two if clauses:

=IF(T(B1)="",0,IF(A2=2,1,0))

returns 0 (false) unless both conditions are true then = 1 (true)

put this formula in the conditional formatting formula
 
D

David Billigmeier

Sure... I'm a little unclear, though, if you want to check if the value in B1
has a text value, or the value is literally "text", but i'll give both
formula's:

In the conditional formatting menu, click on the drop down box and choose
"Formula Is." Now, if you want to check if the value in B1 is just any text
value, use this formula:

=AND(ISTEXT(B1),A2=2)

If you want to check if the value in B1 is literally "text" use this formula:

=AND(B1="text",A2=2)
 
Top