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.


8 Comments on “Alternating row backgrounds / conditional formatting in OpenOffice.org”

  1. Yolar's avatar Yolar says:

    This doesn’t work. There doesn’t seem to actually be a way to apply cell styles to cells.

  2. Yolar's avatar Yolar says:

    Just wanted to add that I got this method to work, but only after upgrading from oo.o 1.0.1 to LibreOffice Portable 3.34. Trying it in oo.o on WinXP causes the app to hang/wedge.

  3. Lisa's avatar Lisa says:

    Is there a way to do color banding on whatever is filtered (visible)?

  4. Richard D's avatar Richard D says:

    Great walkthrough. I am used to MS Office, so wasn’t sure how to do this in OpenOffice. You made it easy!

  5. KDS's avatar KDS says:

    When exporting to HTML, only the first formatted row has the correct color.


Leave a reply to Richard D Cancel reply