conditional formatting using existing style

Conditional formatting requires creation of new style which then gets applied to the cells that fulfill the condition in the given range.

If I have a row in which different cells use different formats, then if that row gets selected as part of the condition, then the selected style gets applied to all the rows. I would like to just change the cell contents to Bold without changing the font or any other attributes (such as border, number format or date format). To explain further if one cell has font size 12, other cell has font size 8 and if the style defined for "conditional format " has font size 10 then for the selected cells having existing font size of 12 and 8 respectively, the font size changes to 10. My requirement is that keeping the existing font size, the cell contents should be made “bold”.

How can this be achieved?

Conditional formatting does not apply the cell style associated with the first TRUE condition in the sense of assigning it to the cell. Only the properties that are set differently as compared with the topmost common ancestor style are overlaid over the original style. Modifications per cell by direct formatting will persist.
Thus you may well use named styles defined in advance of defining the CF. You just have to thoroughly regard the inheritances. If you do it in the simplest way possible, there is a good chance to get what you want.


  1. There sometimes is recommended a tricky way of using CF where named cell styles are actually assigned to the respective cells during the evaluation of the condition(s) which always return(s) FALSE in the standard variant of this method. I would not encourage you to do it this way. (Direct formatting will also persist.)
  2. My answer is derived from experience and “experimental research”. There also is paragraph 16.3 of the ‘OpenDocument-v1.2-part1’ document which is concerned with conditional styles. You may study that document trying to understand better than I do if there also is a sufficient definition of the semantics in addition to the syntax to use for a persistent representation (file). The ‘Recalculation’ part2 of the documents does not mention CF at all.
  3. Someone knowing the details about this is asked very kindly to help me to improve my understanding.

(Editing with respect to the below comment by the OQ:)
A banality: As there is no sufficiently complete specification we cannot rely on one. Whatever way it is, the description of the state based on experience is a result of some kind of “reverse engineering”. Another way of insight can be obtained studying the source code. I didn’t. Lacking a specification, however, it is fundamentally impossible to keep features apart from bugs. Changes without notice are to be expected. I aggree with your conclusion that getting back to ‘default’ making an attribute subject to inheritage again can presently only be done by recreating the style from scratch. It’s a pity.
Also see this demonstration.
I more than once considered to file a bug report and some suggestions concerning this issue. To date I did not because I am afraid of the topic being too complex to get it into the queue.

I have had this problem because the font size was set to 10 in the style used for conditional formatting. I resolved this by defining another style that used the default (inherited) attribute. This raises another question, how to edit a style and reset any attribute to use the default value? The only alternative is to delete and define another style.