Ask Your Question

How to select odd or even rows in Calc?

asked 2019-02-03 11:41:47 +0200

DreamCode gravatar image

I have a big table in LibreOffice Calc and I want to change the background color for each two rows (the odd rows). I can select all the rows in the table but I want to only select the odd rows.

Is there any way to do that? After selecting all the rows in the table, maybe a keyboard shortcut, a hotkey for selecting only the odd rows (or, well, for de-selecting the even rows). Or an option in the menus for doing that?

Without such an option, manually selecting each two rows is a very rudimentary approach.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-02-03 12:47:21 +0200

Lupp gravatar image

updated 2019-02-05 21:34:25 +0200

(There are ways to do as you asked for using a filter and a helper column, but...)
You should better not assign the background color by hard attributing, but overlay it by ConditionalFormatting.
-1- Define a named CellStyle ("csListingPaper" e.g. derived from "Default" most likely") for which the wanted background is selected. (concerning the wanted ListingPaper style I would recommend Light Green 4.)
-2- Select all the sheet or the range of rows you want to apply the listing-paper-style to.
-3- Open the dialog >Format>Conditional>Condition.
-4- Select the mode Formula is from the left hand ListBox.
-5- Enter into the formula line ISODD(ROW()).
-6- From the ListBox below select the above mentioned style.
-7- OK.

===Edit1 2019-02-05 21:35 CET=== Example: See this document.

edit flag offensive delete link more


Thanks. I'm using LibreOffice x64 on Windows 10 x64 and it doesn't remember the Conditional Formatting custom Conditions. I am defining a new condition and when I try to apply it again, it's gone, I can only find only the "Condition 1" in the Conditions list. Strange

DreamCode gravatar imageDreamCode ( 2019-02-05 08:00:46 +0200 )edit

I more than once used this way to get the look-and-feel of classical listing paper, and it worked. Neither old versions nor recent ones made files "forgetting" the CF.

Lupp gravatar imageLupp ( 2019-02-05 21:33:04 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-02-03 11:41:47 +0200

Seen: 3,635 times

Last updated: Feb 05 '19