Bug 100177 - Result of the combination IF() and AND()
Summary: Result of the combination IF() and AND()
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-01 15:17 UTC by h7rojas
Modified: 2016-06-02 02:48 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example bugs (288.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-06-01 15:17 UTC, h7rojas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description h7rojas 2016-06-01 15:17:21 UTC
Created attachment 125447 [details]
Example bugs

The evaluation, for example:
A1: 700
A2: 600
A3: 500
A4: 600
A5: 10000
A6: 2000
B2: =IF(AND(A1>=A2;A3<=A4);"";A6)
Result B2 is TRUE???

Spanish
Evaluando, por ejemplo:
A1: 700
A2: 600
A3: 500
A4: 600
A5: 10000
A6: 2000
B2: =SI(Y(A1>=A2;A3<=A4);"";A6)
Resultado de B2 es VERDADERO???

Comentario: Esto parece ocurrir sólo cuando la opcion verdad esta como respuesta vacía ("")
Comment 1 Eike Rathke 2016-06-01 15:55:10 UTC
Yes, because AND(A1>=A2;A3<=A4) is FALSE hence the result of A6 is returned and apparently B2 is formatted as BOOLEAN => anything != 0 is displayed as TRUE.
Comment 2 Octavio Alvarez 2016-06-02 02:39:21 UTC
Isn't AND(A1>=A2;A3<=A4) == TRUE?
Comment 3 Octavio Alvarez 2016-06-02 02:42:03 UTC
(Sorry, changed it to WORKSFORME because despite the correction, it worked for me.)
Comment 4 Octavio Alvarez 2016-06-02 02:48:09 UTC
The test file does not match the description.

Column C1 contains =IF(AND(B1>=E1,B1<=E1),"",B1) which is the equivalent of IF(E1=E1) because it is otherwise a contradiction. So, this will always return TRUE, and thus, C1 gets the value of B1, which contains a number.

Also, the file has C2 formatted as boolean. Boolean formatting shows FALSE on 0 and TRUE otherwise.