2009. február 11., szerda

Coloring every second row in excel or openoffice.org

Today, I wanted to create a nice looking spreadsheet in Openoffice.org. I think coloring every second row helps to make it more easy to fill out, so I've searched for some way to do that.

As it turns out, it is pretty simple:
1. In openoffice.org, press F11 and create a new formatting style (right click, New). Name it like "Highlighted row" and choose an appropriate background color.
2. Select an area where you need the formatting applied.
3. Go to Format -> Conditional formatting, change the drop-down box to "Formula" and enter MOD(ROW(),2). Also choose the style you want applied (the previously created "Highlighted row" style).
4. That's it. Actually by altering the formula, you can also color columns or highlight your sheet like a chessboard.

The above works for Openoffice.org, however, that same can be done very similarly in Excel.