Bug 103652 - FORMATTING: Conditional formatting not working as expected
Summary: FORMATTING: Conditional formatting not working as expected
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-02 14:50 UTC by Mike Robinson
Modified: 2016-11-02 18:44 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case (22.20 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-11-02 15:00 UTC, Mike Robinson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Robinson 2016-11-02 14:50:50 UTC
Version: 4.3.3.2 on Debian 8

I am trying to make a simple conditional formatting where if the cell contains 'Y' the background turns green and if it contains 'N' the background turns red.

I selected the of cells I wanted this to be applied to and went to Format > Conditional formatting > Condition and added a condition "If cell value is equal to 'Y' apply style 'Yes'" and similarly for 'N'. The styles "Yes" and "No" are created with only the background color being set.

http://imgur.com/67qedMN
http://imgur.com/9SNjRD1

However the result is completely unintelligible (at least for me):

http://imgur.com/AT7usjb

I posted a question about this on ask.libreoffice.org (https://ask.libreoffice.org/en/question/73166/conditional-formatting-not-working-correctly/) and I was told that I could accomplish this by setting a conditional formula like UPPER(A2)="Y" however this is not obvious at all and that I need to use double quotes, not single quotes. If the result of "If cell value is equal to 'Y' apply style 'Yes'" is as expected, then it is a UI bug because it needs to be made more clear what this is *actually* doing. If it's not then it's a regular bug that should be fixed.
Comment 1 Xisco Faulí 2016-11-02 14:54:50 UTC
4.3.3.2 is a very old version of Libreoffice.
Could you please retest it with a newest version of libreoffice from https://www.libreoffice.org/download/libreoffice-fresh/?
Comment 2 Mike Robinson 2016-11-02 15:00:16 UTC
Created attachment 128443 [details]
Test case
Comment 3 Robert Großkopf 2016-11-02 18:33:37 UTC
When opening the attached document and go to 
Format > Conditional Formatting > Manage > Edit
there appears a warning in Condition 1: 
Strings without quotes are interpreted as column/row labels
When entering "Y" instead of 'Y' the warning disappears.
Same for the second condition: "N" instead of 'N'.

With singlequotes like 'Y' there will be referenced to another cell (left or upside the cell). See the help for this.

In all formulas must be used doublequotes like "Y" for text instead.

Can't find a bug here for LO 5.2.2.2, OpenSUSE 42.1 64bit rpm Linux.
Comment 4 Xisco Faulí 2016-11-02 18:44:32 UTC
Hi Robert,
Thank you for investigating this issue. Closing this issue as RESOLVED NOTABUG