Bug 101465 - If statement Function Wizard Result not the same as cell
Summary: If statement Function Wizard Result not the same as cell
Status: CLOSED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Function-Wizard
  Show dependency treegraph
 
Reported: 2016-08-12 12:25 UTC by langba
Modified: 2017-07-12 20:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description langba 2016-08-12 12:25:35 UTC
Two identical calc spreadsheets.  Each has the same formula.  A1 is some result between 0 and 100.  A2 is the lower limit, let's say 25.  A3 is the upper limit, let's say 75.

The intent of the formula is that if the value falls at or between the limits of 25-75 then it will print the number, otherwise an out of limits warning message.

Note: it appears all three variants of "TRUE" work:  =1 or =TRUE or =TRUE() all seem to work.

=IF(AND(A1>=A2,A1<=A3)=1,A1,"Out of limits")
=IF(AND(A1>=A2,A1<=A3)=TRUE,A1,"Out of limits")
=IF(AND(A1>=A2,A1<=A3)=TRUE(),A1,"Out of limits")

One spreadsheet prints the number value in cell A1, the other spreadsheet will not.  The other spreadsheet only prints TRUE or FALSE.

It should be noted that the Function Wizard Results show the number only in both spreadsheets.

Why does the second spreadsheet cell say TRUE or FALSE only?
Comment 1 Eike Rathke 2016-08-12 12:52:05 UTC
Likely because the one that displays only TRUE and FALSE has a boolean number format applied to the cell.

Please, this bug tracker is not a help desk, use http://ask.libreoffice.org/ instead.
Comment 2 langba 2016-08-12 15:49:06 UTC
"Likely"?

I checked that cell is not boolean formatted.  I am not asking for help desk.  I am reporting a bug.
Comment 3 m_a_riosv 2016-08-12 22:04:58 UTC
Where are your sample spreadsheets showing what you asseverate it's a bug?, crystal balls are not too much useful to reproduce/find a bugs.

If I'm not wrong, second formula
=IF(AND(A1>=A2,A1<=A3)=TRUE,A1,"Out of limits")
can't work, it must give a #NAME? error, except if TRUE is a named range/expression.
Comment 4 Buovjaga 2016-10-21 19:06:39 UTC
(In reply to m.a.riosv from comment #3)
> Where are your sample spreadsheets showing what you asseverate it's a bug?,
> crystal balls are not too much useful to reproduce/find a bugs.

Langba:
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 5 Aron Budea 2016-11-03 21:04:45 UTC
Possibly duplicate of bug 75650.