LibreOffice Calc: how to highlight row as per cell value?

If you want to paint all row with a color when the column "B" CONTAINS a value, for example "XXX" you can do this:

Format-> Conditional Formatting (Add)

We select "formula" and we put: SEARCH("XXX";$B2)>=0

We apply the style "Good" (To view selected rows in green)

And we select the matrix in we want actuate (important!), by example : A2:H109

Now we see all the rows where the column B contains "XXX" in green.

enjoy !


  • Select the whole rows, the conditional format shall apply to.
  • Select Format - Conditional Formatting- Condition
  • The Dialog "Conditional Formatting for A1:AMJ[n]" is shown. On bottom in Range: A1:AMJ[n] is shown.
  • In Condition 1 select "Formula is" and input the Formula

    ($H1="invalid")

  • In Apply Style select "New Style...". The Dialog "Cell Style" is shown.

  • In Background tab select a background color.
  • Click OK in all Dialogs.