Show field state colored using conditional formatting in LibreOffice

Estimated reading time of this article: 1 minute

How to color a cell containing a state in LibreOffice?

Example:

  • If the content left to cell is text and a cell contains 1, the cell should be green.
  • If the content left to cell is text and a cell contains is not 1, the cell should be red.
  • Otherwise cell should be white.

Assuming we are in cell C2.

Condition 1

Formula is

AND(B2 = 1; ISTEXT(A2))

Apply style green

Condition 2

Formula is

AND(B2 <> 1; ISTEXT(A2))

Apply style red