I have two columns in my sheet where I would to use conditional formatting. I'd like the cells to
- be turned green when the value = 0
- be red when the value != 0.
Here's how I have the conditional formatting set up:
- Value is equal to 0 --> color green
- Value is not equal to 0 --> color red
See screenshot 1
The output does not consistently color the cells correctly.
- Green cells only have 0 value (this is expected)
- But sometimes red cells have 0 value (this is unexpected)
See screenshot 2
Any tips on how to fix this?
If it helps, the values of cells in these columns are computed from other cells.
- column X is =W2-AE2
- column Z is =Y2-(AE2-AF2)
CodePudding user response:
This is due to the precision of the calculation, especially if you work with days and hours in W, AE and AF. So try to round the results.
for instance
=round(___your formula____,6)
