Calc: Highlight Even or Odd Rows Quickly

I often like to highlight even or odd rows in a spreadsheet in order to make it easier to read. This can become labor intensive when you have a lot of data. Today, I am going to show you how to do it quickly in LibreOffice’s Calc program.

First, you need to highlight all the data within the highlight range, this includes the even and odd rows.

highlight data image

In the menus, Format > Conditional Formatting. In the Conditional Formatting dialog, click the New Style button. On the Organizer tab, give the style a name like “Row Highlight”.

Cell Style Name Image

Move to the Background tab and select your highlight color.

Cell Style Background Image

Click OK. The style in the Cell Style drop down will change to the style you just created. Change the condition of the style to Formula is and type ISEVEN(ROW()) into the input box. Click OK.

Conditional Formatting Dialog image

Now, your even numbered rows are highlighted.

Results image

You can do the same thing with odd rows by using ISODD(ROW()). To get the same effects on columns, you can use ISEVEN(COLUMN()) and ISODD(COLUMN()).

For more on LibreOffice, check out my articles in Full Circle magazine.


7 comments on “Calc: Highlight Even or Odd Rows Quickly

  1. thom says:

    Awesome! Thanks!

  2. Laercio says:

    I have a challenge that I could not solve.
    Supose you want to highlihte the rows where column A has cells with even values.

    Thanks for sharing knowledge!

    • E E Perry says:

      That might actually require a macro rather than conditional formatting. I’ll give it some thought, and maybe it will show up here as an article.

      • Laercio says:

        I found a answer: $A1>4 in the formula field, for exemple, after selecting all the cells and columns I want, column A included. $A1 is the first cell on column A that I choosed. I think it will work in any case.

        Pity I can’t send you the result. The whole row where A cell is greater than 4 got highlighted.

      • E E Perry says:

        Yep. Just tested it out, and it works. Good call.

  3. Max Liedström Kvelland says:

    This no longer works as of april 20th 2015.

    • E E Perry says:

      If you mean the article itself, the basic idea still works (tested in LO 4.4), but the menus are now Format > Conditional Formatting > Condition. Also, make sure you click the Add button to add your condition to the cell range. You can now have multiple conditions.

      I also tested the hack that Laercio suggested, and it works in LO 4.4 as well. On that one you really have to pay attention to the way you enter the cell reference. $A1 fixes the column but the row is relative.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s