I’d like to have a table in LibreOffice Calc 5.3.0 that has alternating row background colors, and at the same time highlights values below 5 with a red font color. Here’s an example of how I want it to look:
But I want the styles to be fully dynamic, so that I can modify cell values and add/remove rows and the styles will update themselves accordingly.
From what I read, it sounds like I need conditional formats - but I can’t get it to work correctly. Here is what I did:
- I created two custom cell styles:
- Style grey_background has no properties set except for a grey background.
- Style red_font has no properties set except for a red font color.
- I added two conditional formats to the cell range that contains the table:
- One conditional format applies style grey_background based on the formula
isodd(row())
. - One conditional format applies style red_font if the cell value is less than
5
.
But the result is wrong:
As you can see, the numbers 4 and 3 didn’t turn red, even though they match the “less than 5” condition. It’s as if the grey_background style is blocking the red_font style from being applied to the same cell.
What is happening there, and how can I fix it?