Conditional Formatting w/ Formulas

Austin Lang

New Member
Joined
Sep 10, 2021
Messages
46
Office Version
  1. 365
  2. 2021
  3. 2019
Platform
  1. Windows
Hey all,

I feel like this is a simple one but I am having a brain fart about it..

I have a document that has these separate conditional formatting rules.. How do I go about combining these into one? I attempted to add OR but I am falling short somewhere.

=AND($A5="Circuit 1",$AB5<1.5)
=AND($A5="Circuit 2",$AB5<1.5)
=AND($A5="Circuit 3",$AB5<1.5)

Thanks in advance.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
may be:
VBA Code:
=AND($AB5<1.5,OR($A5={"Circuit 1","Circuit 2","Circuit 3"}))
 
Upvote 0
@bebo021999 just beat me, but here's the same (just reversed) with a demo:

CF.xlsx
ABAAAB
4
5Circuit 0test1
6Circuit 1test1
7Circuit 2test1.25
8Circuit 3test2
9Circuit 4test2
10
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B5:B9Expression=AND(OR($A5="Circuit 1",$A5="Circuit 2",$A5="Circuit 3"),$AB5<1.5)textNO
 
Upvote 0
Thank you both for your answers! I now seem to have a conflict with another rule. Originally, I had to these different rules..

=Cell Value >0.4

=AND($A5="Circuit 1",$AB5<1.5)
=AND($A5="Circuit 2",$AB5<1.5)
=AND($A5="Circuit 3",$AB5<1.5)

Now that we have combined the three, now it is conflicting with the first formula. It was not conflicting previously. The end goal would be to follow the first rule unless it is Circuit 1, 2, or 3.
 
Upvote 0
Is this what you mean?

CF.xlsx
ABAAAB
4
5Circuit 00.31
6Circuit 10.41
7Circuit 20.51.25
8Circuit 30.62
9Circuit 40.72
10
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B5:B9Expression=AND(OR($A5="Circuit 1",$A5="Circuit 2",$A5="Circuit 3"),$AB5<1.5,B5>0.4)textNO
 
Upvote 0
I am looking for a rule (or two) that says that the first one should be red because it doesn't meet the criteria, but the 2nd line should be green.

1650516907585.png
 
Upvote 0
I'm starting to lose your flow of logic now, but perhaps this:

CF.xlsx
ABAAAB
5
6Circuit 181
7Circuit 681.25
8
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B6:B7Expression=AND(OR($A6="Circuit 1",$A6="Circuit 2",$A6="Circuit 3"),$AB6<1.5,B6>0.4)textNO


Where the cells are green to start with, and the conditional formatting turns it to red.
 
Upvote 0
I realized after I replied last, I have made a mess of it, so I apologize for that. Let me try and clear it up..

By default, the cell is red. It is red until proven it can be green, if that makes sense. I we have approx. 50 circuits that can be entered. If it is Circuit 4-50, I want it to follow the rule that the value entered into V needs to be greater than 4 to be green. If it is Circuit 1-3, I want it to only turn green if the number is greater than 15. (Ignore column W, that one is not formatted correctly. I will fix that after I get this one done.

1650518077758.png
 
Upvote 0
Try again for green:
Code:
=$V5>IF(OR($A5={"Circuit 1","Circuit 2","Circuit 3"}),15,4)
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

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