Alternating Row (or Column) Colors in Calc for OpenOffice.org or LibreOffice
Sometimes it improves the legibility of spreadsheets to have alternating row or column colors. Doing this manually (holding ctrl + left-clicking, then changing the background fill color of the selected cells) can be tedious and cumbersome. So, while the manual method suffices for short spans of cells, something more automated is preferred for entire documents, worksheets, or a copious number of rows or columns.
There are actually a few ways to do this in OpenOffice.org Calc (version 3.2 shown below), but the easiest method is to use Conditional Formatting. That’s the method I’ll show you below.
First, select the range of cells that you wish to have alternating background colors (by left-clicking at the first desired cell in the range and then continuing to hold down the left mouse button as you move to the last desired cell).
When you have the range you want selected (it’ll look a different color) you need to left-click Format > Conditional Formatting… from the top menu bar.
Then, in the window that appears, you’ll need to change a few settings. First, you’re going to need to make a new style, so left-click on the New Style… button.
Type your new style name, something like “Gray Rows”.
Then left-click on the Background tab. Here, you’ll need to left-click the color that you’ll want for the alternating background, try “Gray 20%”. Then left-click OK.
Finally, click the left drop-down that reads “Cell value is” and change it to “Formula is”.
Then type ISEVEN(ROW()) into the adjacent box. Left-click OK and you’re done.
To apply the styling to other rows or columns in the same document – just repeat the process, but instead of creating a new style, just select the one you already made from the drop-down within the Conditional Formatting window.
TIP: You can substitute ISEVEN(COLUMN()) for the formula, and end up with alternating colored columns. You can also substitute ISODD(ROW()) to color the odd rows rather than the even ones. Try it a few times, and you’ll see that it’s actually pretty easy and often useful.