[Libreoffice-bugs] [Bug 103793] FORMATTING: Conditional formatting doesn't respect category of number-format (Documentation per Comment 8).

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat May 4 23:45:41 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=103793

--- Comment #9 from AndyK <a.koenigsdorf+lo at gmail.com> ---
I have a little table where I want positive values lower or equal 10 to be
displayed as percentage "#,##0%" and values higher than 10 as normal decimal
values with format "#,##0".

1. I made a style "percentage" based off of the standard/default style, changed
the number formatting to percentage "#,##0%" and selected the bold font type
(to verify).
2. I made a style "number" based off of the standard/default style, changed the
number formatting to decimal "#,##0" and selected the italic font style (to
verify)
3. I typed in A1 the value 2.5, A2 the value 0.5, A3 the value 125 and in A4
the value 30.
4. I created a conditional formatting with condition 1 "value is below 11" set
use style "percentage" and condition 2 "value is equal or greater than 11" use
style "number". Range A1:A4

I thought conditional formatting would allow me to do this, but it is not as I
can't change number formatting using conditional formatting.

If I manually set the style "percentage" or "number" to a cell, the correct
number format will be displayed.

--------

While writing this and verifying every step along I found a workaround:

1. Enter your values
2. Select the cells you want to have the conditional formatting
3. "Edit" -> "Clear Cells (Backspace)" -> select only "Format"
4. Create styles (if necessary)
5. Create/Apply conditional formatting

The step to clear all formats is the key action to have this working.
Even though the user has not explicitly applied a format did so implicitly.

Imho this information should be included in the help documentary.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190504/e0dafdba/attachment.html>


More information about the Libreoffice-bugs mailing list