Bug 89166 - IF statement in cell does not work as expected.
Summary: IF statement in cell does not work as expected.
Status: CLOSED DUPLICATE of bug 88945
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-06 11:12 UTC by André K.
Modified: 2016-05-31 15:50 UTC (History)
2 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 André K. 2015-02-06 11:12:16 UTC
According to calcguide this should work;
=IF(C3>0, B3/C3, "No Report")

it does not work, ; is expected instead of commas.
More important . if true-calculation does not work

=IF(3=3; B3/C3)  gives "TRUE"
=IF(3=3; "10") works as text
=IF(3=3; 3) does not work
Comment 1 A (Andy) 2015-02-06 20:58:58 UTC
Only issue 1 is for me reproducible with LO 4.4.0.3, Win 8.1, therefore it is maybe a Linux only issue?


Issue 1: =IF(C3>0, B3/C3, "No Report")
-> confirmed, this is a mistake in the Calc User Guide, it should be ";" instead of ","

Sources:
- http://www.libreoffice.org/get-help/documentation/ -> LibreOffice 4.0 - 4.1 User Guides -> Calc Guide 4.1 (spreadsheets) -> Page 195 and 415
- http://de.libreoffice.org/get-help/documentation/ -> Handbuch "Calc" (Tabellenkalkulation) -> Kapitel 07 – Formeln und Funktionen -> Page 8 
and Anhang B – Calc Funktionen -> Page 33


Issue 2: =IF(3=3; B3/C3)
if B3 and C3 are empty it returns "#DIV/0!" and if the cells contain numbers, then there are correctly calculated
-> for me not reproducible with LO 4.4.0.3, Win 8.1


Issue 3: =IF(3=3; "10")
correct, the result is Text, to have a Number you need to write =IF(3=3; 10)
-> for me not reproducible with LO 4.4.0.3, Win 8.1


Issue 4: =IF(3=3; 3)
it returns "3" as expected
-> for me not reproducible with LO 4.4.0.3, Win 8.1
Comment 2 m.a.riosv 2015-02-06 21:57:14 UTC
1: Functions separator is language dependant, English-US the base language, and with it default separator is comma, perhaps the reason to figure in the documentation.
It can be changed in Menu/Tools/Options/LibreOffice calc/Formula - Separators.

2: The TRUE format (It's only format) can be inherited from an adjacent cell, usually a clear direct formatting [Ctrl+M] restart the format.

2:+3:+4: At @Andy had commented

None of the issues are reproducible for me.
Win7x64
Version: 4.3.7.0.0+ Build ID: 32e7fc9e82e0e62e872611482d97f745bac3899a
Comment 3 A (Andy) 2015-02-06 22:10:06 UTC
(In reply to m.a.riosv from comment #2)
> 1: Functions separator is language dependant, English-US the base language,
> and with it default separator is comma, perhaps the reason to figure in the
> documentation.
> It can be changed in Menu/Tools/Options/LibreOffice calc/Formula -
> Separators.

@m.a.riosv: Thank you very much for your hint and feedback.  In this case this should also be mentioned in the Documentation?  Is it already mentioned there?  I could not find it on the fly.  Can you maybe help here too?
Comment 4 m.a.riosv 2015-02-07 01:15:39 UTC
@Andy, the only place I have found now is https://help.libreoffice.org/Common/Formula_2, as I remember the official separator is the semicolon but being language dependant, I think this happen for languages in which the dot not the comma is the decimal separator.
Much of the help come from OOo times.

Maybe a request for enhancement about an explanation in help could be fine.

Perhaps a duplicate of:
https://bugs.documentfoundation.org/show_bug.cgi?id=88945
Comment 5 QA Administrators 2016-02-21 08:38:18 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

   Test to see if the bug is still present on a currently supported version of LibreOffice 
   (5.0.5 or 5.1.0)  https://www.libreoffice.org/download/

   If the bug is present, please leave a comment that includes the version of LibreOffice and 
   your operating system, and any changes you see in the bug behavior
 
   If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave 
   a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

   Update the version field
   Reply via email (please reply directly on the bug tracker)
   Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
   appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2016-02-21
Comment 6 Eike Rathke 2016-05-31 15:49:59 UTC

*** This bug has been marked as a duplicate of bug 88945 ***