Ask Your Question

Calc: Apply format style to entire row depending on a value of one of its columns

asked 2017-11-08 12:11:54 +0200

updated 2017-11-08 12:16:27 +0200

Suppose the following table is presented:

    A   B
    -   -----
1 | R   Red
2 | G   Green
3 | B   Blue

And one wants to apply different style formatting on the entire row depending on what value the column A of that row holds.

How to do that? Conditional Formatting? Search & Replace? Macro?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-11-08 12:31:41 +0200

Lupp gravatar image

updated 2017-11-08 12:36:41 +0200

You need to define the Conditional Format for the Range containing all the complete rows, and to use absolute addressing for the column part of the reference in the condition. Having selected A1:AMJ10 e.g. (AMJ being the 1024th column) the condition to apply the cell style csRed will be in mode 'Formula is' and read $A1="R". Then follow two similar conditions for csGreen and csBlue.

(As always with CF this will overlay the attributes for the view. The styles are not assigned to the property .CellStyle of the respective cells.)

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-11-08 12:11:54 +0200

Seen: 1,878 times

Last updated: Nov 08 '17