Conditional Formatting: Can you combine OR & AND rules?

wittonlin

Board Regular
Joined
Jan 30, 2016
Messages
144
Separately they work fine, but I have a bunch so combining these rules would be fantastic.

Code:
=AND($M101="Male", NOT($H101="TN"))

Code:
=$H101="KY"

Both my attempts won't work :(

Code:
=OR($H101="KY"),AND($M101="Male", NOT($H101="TN"))

Code:
=AND($M101="Male", NOT($H101="TN")),OR($H101="KY")

Is there ANY possible way to combine these rules?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Tell us in words how the conditional formatting should decide whether to apply the format or not.

What cell are you giving us these attempts for?
 
Upvote 0
Perhaps.

=OR($H101="KY",AND($M101="Male",$H101<>"TN"))
 
Upvote 0
Perhaps.

=OR($H101="KY",AND($M101="Male",$H101<>"TN"))

Friggen Fantastic!

Nice touch, I didn't think about '<>' and removing that one bracket was the key!

Now I was able to do them all! Even with a legitimate already OR statement!

Code:
=OR($H101="TN", $H101="OK")
Code:
=AND($M101="Male", NOT($H101="KY"))

It works perfectly here too!

Code:
=OR($H101="TN", $H101="OK",AND($M101="Male", $H101<>"KY"))

Thank you AGAIN Norie!
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top