Conditional Formatting: Cell Color Changing Depending on Value(s)

Ottsel

Board Regular
Joined
Jun 4, 2022
Messages
167
Office Version
  1. 365
Platform
  1. Windows
I need the fill color of cells F150:G150 to remain the color green (Hex: #E2EFDA). If a value in F150 is blank or 0, then I need cell G150 fill color to change to red (Hex: #C00000), but only if the value in F150 is greater than zero.
Example 1
Example 2
Example 3
Example 4
F150: 1​
F150: 0​
F150: "" (blank)​
F150: 4​
G150: 50​
G150: 50​
G150: 50​
G150: 2​
Result: fill color remains green​
Result: fill color changes to red​
Result: fill color changes to red​
Result: fill color remains green​

The issue I'm facing in the conditional formatting is if the cell is blank or zero, then it changes it to red, but I need my fill color to remain green.

Currently using this: "=F150=0"
1666290805852.png


Any tips, help or advice would be greatly appreciated!
 

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.
If a value in F150 is blank or 0, then I need cell G150 fill color to change to red
I am not understanding.
You want to keep the F150 always green.
If F150 is 0 or white, then only change the color of G150?
 
Upvote 0
I am not understanding.
You want to keep the F150 always green.
If F150 is 0 or white, then only change the color of G150?
The default color is green in both cells. The color is F150 should never change and remain green.

If G150 contains a number greater than zero and F150 is zero, then the G150 is red
If G150 contains a number greater than zero and F150 is one, then G150 is the default color (green)

Apologies for the poor wording.
 
Upvote 0
First highlight cells F150 and G150 in green.
In G150 put the following conditional formatting:

varios 20oct2022 hyperlink hipervinculo.xlsm
FG
150
Hoja18
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G150Expression=AND($F$150=0,$G$150>0)textNO
 
Upvote 0
Solution
First highlight cells F150 and G150 in green.
In G150 put the following conditional formatting:

varios 20oct2022 hyperlink hipervinculo.xlsm
FG
150
Hoja18
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G150Expression=AND($F$150=0,$G$150>0)textNO
Perfect! Thank you so much.

Would there be a way to apply this across multiple rows.

For example: F150:F169?
 
Upvote 0
Change the formula without the sign in the row

From this:
=AND($F$150=0,$G$150>0)

To this:
=AND($F150=0,$G150>0)
 
Upvote 0

Forum statistics

Threads
1,215,815
Messages
6,127,035
Members
449,355
Latest member
g wiggle

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