[Libreoffice-commits] help.git: source/text

Seth Chaiklin (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 17 14:40:47 UTC 2020


 source/text/scalc/01/04060105.xhp |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 9d505510f15289b1393c2b2c654b23f03790c250
Author:     Seth Chaiklin <sdc.blanco at youmail.dk>
AuthorDate: Tue Dec 8 14:36:24 2020 +0100
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Thu Dec 17 15:40:26 2020 +0100

    tdf#99613  clarify empty parameters in IF function in Calc
    
      + add two examples; explain that empty parameters are
         considered to be 0.
    
    Change-Id: I5c218472774fdd00581cc0e12f2b228191742275
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/107381
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/source/text/scalc/01/04060105.xhp b/source/text/scalc/01/04060105.xhp
index 3dbcab1a4..d42ad8e03 100644
--- a/source/text/scalc/01/04060105.xhp
+++ b/source/text/scalc/01/04060105.xhp
@@ -108,7 +108,7 @@
 <h2 id="hd_id3150141">IF</h2>
          <paragraph xml-lang="en-US" id="par_id3148740" role="paragraph"><ahelp hid="HID_FUNC_WENN">Specifies a logical test to be performed.</ahelp></paragraph>
          <embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
-         <paragraph xml-lang="en-US" id="par_id3154558" role="code">IF(Test [; ThenValue [; OtherwiseValue]])</paragraph>
+         <paragraph xml-lang="en-US" id="par_id3154558" role="code">IF(Test [; [ThenValue] [; [OtherwiseValue]]])</paragraph>
          <paragraph xml-lang="en-US" id="par_id3149727" role="paragraph">
             <emph>Test</emph> is any value or expression that can be TRUE or FALSE.</paragraph>
          <paragraph xml-lang="en-US" id="par_id3155828" role="paragraph">
@@ -120,7 +120,10 @@
          </paragraph>
          <embed href="text/scalc/01/common_func.xhp#sectionexample"/>
          <paragraph xml-lang="en-US" id="par_id3150867" role="paragraph">
-            <item type="input">=IF(A1>5;100;"too small")</item> If the value in A1 is higher than 5, the value 100 is entered in the current cell; otherwise, the text “too small” (without quotes) is entered.</paragraph>
+            <input>=IF(A1>5;100;"too small")</input> If the value in <literal>A1</literal> is greater than <literal>5</literal>, the value <literal>100</literal> is returned; otherwise, the text <literal>too small</literal> is returned.</paragraph>
+         <paragraph role="paragraph" id="par_id71607569817532">
+            <input>=IF(A1>5;;"too small")</input> If the value in <literal>A1</literal> is greater than <literal>5</literal>, the value <literal>0</literal> is returned because empty parameters are considered to be <literal>0</literal>; otherwise, the text <literal>too small</literal> is returned.</paragraph>
+         <paragraph role="paragraph" id="par_id11607570458867"><input>=IF(A1>5;100;)</input> If the value in <literal>A1</literal> is less than <literal>5</literal>, the value <literal>0</literal> is returned because the empty <emph>OtherwiseValue</emph> is interpreted as <literal>0</literal>; otherwise <literal>100</literal> is returned.</paragraph>
       </section>
       <section id="Section3">
 <bookmark xml-lang="en-US" branch="index" id="bm_id3155954"><bookmark_value>NOT function</bookmark_value>


More information about the Libreoffice-commits mailing list