ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Two Conditions (https://www.excelbanter.com/excel-discussion-misc-queries/46970-two-conditions.html)

Xandlyn

Two Conditions
 
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!!

David Billigmeier

Format-'Conditional Formatting'

--
Regards,
Dave


"Xandlyn" wrote:

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!!


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?

"David Billigmeier" wrote:

Format-'Conditional Formatting'

--
Regards,
Dave


"Xandlyn" wrote:

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!!


BenjieLop


Xandlyn Wrote:
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"


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=470334


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

"Xandlyn" wrote:

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!!


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)

--
Regards,
Dave


"Xandlyn" wrote:

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?

"David Billigmeier" wrote:

Format-'Conditional Formatting'

--
Regards,
Dave


"Xandlyn" wrote:

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!!



All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com