Alternating row backgrounds / conditional formatting in OpenOffice.org

Have you put together an OpenOffice.org table in OpenOffice.org Calc, and wanted to display alternating backgrounds for easy reading? Well, there’s an easy way to do it.

A spreadsheet section showing rows formatted with alternating white and gray backgrounds.

Row backgrounds alternating white and gray 10%


The steps are:

  1. Create a style for every other row and call it “Even rows.” Make its background “Gray 10%,” or whatever other color and attributes you prefer.
  2. In your spreadsheet, select the range of rows you’d like to format.
  3. In the Format menu, click “Conditional Formatting…”.
  4. Choose “Formula is” in the first dropdown.
  5. For the condition itself, enter the formula ISEVEN(ROW()). This formula tests if the current row in question is even or not. If it is, the condition is met and your style is applied.
  6. For Cell Style, select the style you created back in Step 1.
  7. Click OK. There you go.
Dialog box showing formula entered properly in OpenOffice.org.

Your formula should look like this.

Advertisements