Calc: Is there a way of having every third row be colored, or preferably, have the rows be colored with three alternating colors?

I know you can use ISEVEN(ROW()) to have every other row be colored. But is there a way to have every third row be colored or to have three alternating colors?

Thank you

Use the modulo-function MOD in conditional formatting

MOD(ROW(); 3) = 0

https://wiki.documentfoundation.org/Documentation/Calc_Functions/MOD

To have 3 colours you will need 2 conditions then. Third colour is the default.

2 Likes

The colors remain in order, although rows are deleted.
imagen

colored_rows_3.ods (10.4 KB)

With Conditional Formatting, the content.xml subfile size is nearly 5% greater than if styles (bad, good, neutral) are applied to cells to get the colors.

2 Likes

I only use Calc to help keep track of my movie library so the extra step you took is appreciated. :slight_smile: Much appreciated.

1 Like

Create a pattern and mark it.
Drag down as desired.
Dragging can also be repeated further down.

Calc - Zeilen dreifarbig

2 Likes

And, if you want to add this to a filled spreadsheet: Prepare the first 3 rows, copy them and paste-special selecting only to paste formatting.

2 Likes

Thanks to both of you for showing me a second method and for the paste formatting tip.