[Dropped] Conditional formatting which preserves borders
[Dropped] Conditional formatting which preserves borders
Is there a way to not have conditional formatting not overwrite a cells borders? I have set styles without setting borders, but when I apply to a cell that has borders, it overwrites and removes the borders. Is there a way to leave the borders intact if you don't want them overwritten. I would like to use the same style in a conditional format on cells that have borders and cell that do not have borders without setting different style for each possible border setup.
OpenOffice 4.1.1 on Windows 10
Re: conditional formatting
This is impractical. You can't have borders with conditional formatting unless all cells have the same borders. A conditionally formatted range with one set of outside borders needs 4 stlyes for the corner cells and 4 styles for each side plus one for the center cells. That is 9 styles for each condition and 9 ranges with different conditional formats.
P.S. Perhaps you can set the outer borders of the adjacent cells instead of the conditionally formatted range.
P.S. Perhaps you can set the outer borders of the adjacent cells instead of the conditionally formatted range.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: conditional formatting
Like thisVilleroy wrote:P.S. Perhaps you can set the outer borders of the adjacent cells instead of the conditionally formatted range.
- Attachments
-
- CF_Borders.ods
- (18.94 KiB) Downloaded 169 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: conditional formatting
Your point is exactly what I was saying, I don't want borders in the "condition" because you would have too many, but I can't use borders on the adjacent cells because I want borders between conditional cells that are next to each other. However, not having borders in the conditions overwrites the existing cell border with no border thereby erasing the existing border. Can you have conditional formatting that doesn't erase existing borders?
OpenOffice 4.1.1 on Windows 10
Re: conditional formatting
No, I don't think so.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Conditional formatting which leaves borders unchanged
You can not apply the properties of a Style partially. All of the properties will be applied. If you want no border in one case, and you want borders in an another case, then you must create and apply - at least - two different Cell Styles.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Conditional formatting which leaves borders unchanged
OK, I can offer a macro solution. It is not trivial, but once you have applied this solution sucessfully, the spreadsheet does no longer depend on these macros.
One macro generates 15 bordered substyles to a given borderless style.
The other macro applies the appropriate bordered styles to selected cell ranges that have been conditionally formatted with those borderless styles.
The attached document has unformatted random numbers in a rectangle, a row, a column of cells and a single cell and instructions how to make the example work. The final conditional formatting keeps on working even if you strip all macro code from that document. The code just performs the tedious work you don't want to do manually.
One macro generates 15 bordered substyles to a given borderless style.
The other macro applies the appropriate bordered styles to selected cell ranges that have been conditionally formatted with those borderless styles.
The attached document has unformatted random numbers in a rectangle, a row, a column of cells and a single cell and instructions how to make the example work. The final conditional formatting keeps on working even if you strip all macro code from that document. The code just performs the tedious work you don't want to do manually.
- Attachments
-
- CF_Borders.ods
- (26.7 KiB) Downloaded 168 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice