Conditional Formatting Formula

spr1nger

New Member
Joined
May 18, 2021
Messages
26
Office Version
  1. 365
Platform
  1. Windows
What is the formula to use in conditional formatting, if I want to highlight cells A2:E2, if E2 has an "O" in it?
SC DOCUMENT Matrix.xlsx
E
2O
Purchasing
Cell Formulas
RangeFormula
E2E2=VLOOKUP(B2,'Doc Matrix'!B2:R195,17,FALSE)
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Select your range A2:E2, then go to Conditional Formatting and enter this formula:
Excel Formula:
=$E2="O"
and then select your desired formatting.

Note that the location of that "$" is critical. That locks it down so that ALL cells in your selected range look at column E.
 
Upvote 0
Solution
Thank you. I was thinking I had to use an IF function so I was over complicating it. That worked, thank you!
 
Upvote 0
Thank you. I was thinking I had to use an IF function so I was over complicating it. That worked, thank you!
You are welcome.

No, you don't need to use an IF function since in your Conditional Formatting formulas, you need to return Boolean values (TRUE or FALSE).
So you can simply use equations that return TRUE or FALSE (i.e. by using a formula that sees if two things are equal or not).
You typically see a lot of Conditional Formatting formulas structured like this, or use the inequality functions like > or <, or one that use AND or OR functions, if you have multiple things you want to check.

For example, if you wanted to only highlight rows where column E was "O" and column F was greater than 100, you could do:
Excel Formula:
=AND($E2="O",$F2>100)
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,645
Members
448,974
Latest member
DumbFinanceBro

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