It seems, that a conditional formatting via formula STYLE(…) leads to unpredictable comparisons.
Example uploaded: SampleSTYLE.ods
-
cell B1 and A2 both contain number value “4”
-
cell B3 contains (german) formula:
=STYLE(IFS(A2<B1;"Grün";A2=B1;"Gelb";A2>B1;"Rot"))
→ works fine, as it should -
cell B2 contains (german) formula:
=A2+STYLE(IFS(CURRENT()<B1;"Grün";CURRENT()=B1;"Gelb";CURRENT()>B1;"Rot"))
As CURRENT has value 4, as B1 has, condition “CURRENT()=B1” should be met, but isn’t!
- It seems, that “VALUE” and “VALUE plus formatting via STYLE()” seems to be NOT THE SAME when used in comparison.
Is this a bug? Or is there any chance to workaround it?