DarbyBrown
New Member
- Joined
- Jan 22, 2016
- Messages
- 31
- Office Version
- 365
- Platform
- Windows
How do I use Conditional Formatting to change the background color of a columns cell depending on if the difference of two other cells, in that same row, produces a negative value?
i.e.: If Bx-Cx is less than 0 change the background color of Dx to Pink (as in Row 9 below)
Dx has a formula
=If(Cx>Bx, 0, Bx-Cx)
If Cx is greater than Bx, display a 0 in Dx, otherwise display the value of Bx – Cx in Dx.
I total the values of column D and need the negative numbers to be counted as 0. (If that makes any difference.)
That is why I cannot use the value of Dx to base my conditional formatting on.
Also, the values in C and B are linked from cells on other sheets in the workbook. So, I have also tried
If(Val(Cx)>Val(Bx)),
that did not work either!
(Totals are the sum of values from rows 5 thru 13)
Any assistance will be greatly appreciated.
i.e.: If Bx-Cx is less than 0 change the background color of Dx to Pink (as in Row 9 below)
Dx has a formula
=If(Cx>Bx, 0, Bx-Cx)
If Cx is greater than Bx, display a 0 in Dx, otherwise display the value of Bx – Cx in Dx.
I total the values of column D and need the negative numbers to be counted as 0. (If that makes any difference.)
That is why I cannot use the value of Dx to base my conditional formatting on.
Also, the values in C and B are linked from cells on other sheets in the workbook. So, I have also tried
If(Val(Cx)>Val(Bx)),
that did not work either!
(Totals are the sum of values from rows 5 thru 13)
Any assistance will be greatly appreciated.