[gnomeweb-wml] FIx example in Gnumeric documentation



commit 5894bbf96a2799ee6981710299f2c3054de43b26
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Dec 7 02:02:01 2011 -0700

    FIx example in Gnumeric documentation

 .../gnumeric/doc/sect-data-formulas.shtml          |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/projects.gnome.org/gnumeric/doc/sect-data-formulas.shtml b/projects.gnome.org/gnumeric/doc/sect-data-formulas.shtml
index a080945..501bc5c 100644
--- a/projects.gnome.org/gnumeric/doc/sect-data-formulas.shtml
+++ b/projects.gnome.org/gnumeric/doc/sect-data-formulas.shtml
@@ -665,13 +665,17 @@
      function <span class="code" dir="ltr">DMEDIAN</span> one can use the alternative expression 
      <span class="code" dir="ltr">median(if(A1:A20="AA",B1:B20))</span> entered as an array function as described in 
      <a class="xref" href="sect-data-formulas.shtml#sect-data-formulas-array" title="Array Formulas">Section 5.2.4.5 â Array Formulas</a>. Multiple conditions can be combined using
-     the <span class="code" dir="ltr">AND</span> or <span class="code" dir="ltr">OR</span> functions as in 
-     <span class="code" dir="ltr">median(if(OR(A1:A20="AA",A1:A20="BB"),B1:B20))</span>.
+     multiplication to obtain <span class="code" dir="ltr">AND</span> and addition to obtain <span class="code" dir="ltr">OR</span> as in 
+     <span class="code" dir="ltr">median(if((A1:A20="AA")+(C1:C20="BB"),B1:B20))</span>.
      Using defined names as introduced in <a class="xref" href="sect-data-formulas.shtml#sect-data-formulas-names" title="Names">Section 5.2.4.4 â Names</a> for 
      <span class="code" dir="ltr">A1:A20</span> and <span class="code" dir="ltr">B1:B20</span> can make this code very flexible and readable.
-   </p> 
+   </p>
  </div>
 </div>
+<div class="admonition block note block-indent"><div class="note-inner"><p class="para block block-first">
+     In this case we can not use use <span class="code" dir="ltr">if(OR(A1:A20="AA",C1:C20="BB"),...)</span> since the
+     OR function would be applied to all 40 equality tests rather than each of the 40 pairs of equality tests.
+   </p></div></div>
 <div class=" block figure block-indent">
 <a name="dmedian-example-1"></a><div class="block block-first title title-formal"><span class="title"><span class="label"><span style="font-style: italic; ">Figure 5-2</span>â</span>Calculating the MEDIAN of Some Data Values</span></div>
 <div class="figure-inner">



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]