Here is the dataset I am working on.
I want to highlight the transition from 0 to 1 and from 1 to 0.
So a cell should be red if the value of the cell is 1 and the preceding column cell has the value 0. And green when the cell is 0 and the preceding column cell has the value 1
Basically
Transiiton => Color
0 -> 1 => 1 should be Green
1 -> 0 => 0 should be Red
Cell value -> Is greater than -> A1
Apply Style: Bad (gives dark red font color on light red background) or your own cell style
Cell value -> Is lesser than -> A1
Apply Style: Good (gives dark green font color on light green background) or your own cell style.
Notice that Calc will automatically adapt the cell reference "A1" for all cells in range accordingly. Thus, LO Calc will check the condition for cell B3 against B2 instead of A1.
Result: