summaryrefslogtreecommitdiffstats
path: root/source/text/scalc/01/ex_data_stat_func.xhp
blob: a0f2bc98dd633416a545944bc63974de0457460f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
<!--
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
-->

<meta>
  <topic id="textscalc01func_averageifxml">
    <title id="tit" xml-lang="en-US">Examples Dataset for Statistical Functions</title>
    <filename>/text/scalc/01/ex_data_stat_func.xhp</filename>
  </topic>
</meta>

<body>
<section id="ex_func_average">
<paragraph id="hd_id2657394931588" role="heading" level="3" xml-lang="en-US">Examples</paragraph>
<paragraph id="hd_id2609201512474295" role="heading" level="4" xml-lang="en-US">Consider the following table</paragraph>
<table id="table_averageif_example">
  <tablerow>
    <tablecell>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201517430799" role="tablehead" localize="false" xml-lang="en-US">A</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id250920151743116" role="tablehead" localize="false" xml-lang="en-US">B</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201517431582" role="tablehead" localize="false" xml-lang="en-US">C</paragraph>
    </tablecell>
  </tablerow>
  <tablerow>
    <tablecell>
      <paragraph id="par_id2509201517431967" role="tablehead" localize="false" xml-lang="en-US">1</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id18260631312423" role="tablecontent" xml-lang="en-US">Product Name</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201517433075" role="tablecontent" xml-lang="en-US">Sales</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201519383294" role="tablecontent" xml-lang="en-US">Revenue</paragraph>
    </tablecell>
  </tablerow>
  <tablerow>
    <tablecell>
      <paragraph id="par_id959660094035" role="tablehead" localize="false" xml-lang="en-US">2</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2855779586764" role="tablecontent" xml-lang="en-US">pencil</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id110202156219769" role="tablecontent" localize="false" xml-lang="en-US">20</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id23281929326512" role="tablecontent" localize="false" xml-lang="en-US">65</paragraph>
    </tablecell>
  </tablerow>
  <tablerow>
    <tablecell>
      <paragraph id="par_id2509201517432278" role="tablehead" localize="false" xml-lang="en-US">3</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id24967262611733" role="tablecontent" xml-lang="en-US">pen</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201517433391" role="tablecontent" localize="false" xml-lang="en-US">35</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id250920151938352" role="tablecontent" localize="false" xml-lang="en-US">85</paragraph>
    </tablecell>
  </tablerow>
  <tablerow>
    <tablecell>
      <paragraph id="par_id250920151743267" role="tablehead" localize="false" xml-lang="en-US">4</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id252542413030532" role="tablecontent" xml-lang="en-US">notebook</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201517433781" role="tablecontent" localize="false" xml-lang="en-US">20</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201519383822" role="tablecontent" localize="false" xml-lang="en-US">190</paragraph>
    </tablecell>
  </tablerow>
  <tablerow>
    <tablecell>
      <paragraph id="par_id2509201519371339" role="tablehead" localize="false" xml-lang="en-US">5</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201519374677" role="tablecontent" xml-lang="en-US">book</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201519373350" role="tablecontent" localize="false" xml-lang="en-US">17</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id2509201519384171" role="tablecontent" localize="false" xml-lang="en-US">180</paragraph>
    </tablecell>
  </tablerow>
    <tablerow>
    <tablecell>
      <paragraph id="par_id6009596127912" role="tablehead" localize="false" xml-lang="en-US">6</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id19479417931163" role="tablecontent" xml-lang="en-US">pencil-case</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id85353130721737" role="tablecontent" xml-lang="en-US">not</paragraph>
    </tablecell>
    <tablecell>
      <paragraph id="par_id15693941827291" role="tablecontent" xml-lang="en-US">not</paragraph>
    </tablecell>
  </tablerow>
</table>
<paragraph id="par_id1191767622119" role="warning" xml-lang="en-US">In all examples below, ranges for calculation contain the row #6, which is ignored because it contains text.</paragraph>
</section>
<paragraph role="paragraph" id="par_id961527953004850" xml-lang="en-US"><variable id="args">Func_Range; Range1; Criterion1 [ ; Range2; Criterion2 [;...]])</variable></paragraph>
<section id="note01">
    <paragraph id="par_id94162948227556" role="note" xml-lang="en-US">The logical relation between criteria can be defined as logical AND (conjunction). In other words, if and only if all given criteria are met, a value from the corresponding cell of the given <emph>Func_Range</emph> is taken into calculation.</paragraph>
</section>
<section id="warning01">
    <paragraph id="par_id14734320631377" role="warning" xml-lang="en-US"><emph>Func_Range</emph> and <emph>Range1, Range2...</emph> must have the same size, otherwise the function returns err:502 - Invalid argument.</paragraph>
</section>
<section id="par00">
    <paragraph id="par_id23526994221948" role="paragraph" xml-lang="en-US"><emph>Criterion1</emph> – required argument. A string expression representing a logical condition or a cell reference to such string expression. The expression can contain text, numbers, regular expressions or wildcards (<link href="text/shared/optionen/01060500.xhp#wildcards" name="Wild cards">if enabled in calculation options</link>).</paragraph>
    <paragraph id="par_id190621657742" role="paragraph" xml-lang="en-US"><emph>Range2</emph> – Optional. Range2 and all the following mean the same as Range1.</paragraph>
    <paragraph id="par_id317001803813193" role="paragraph" xml-lang="en-US"><emph>Criterion2</emph> – Optional. Criterion2 and all the following mean the same as Criterion1.</paragraph>
</section>
<section id="par01">
    <paragraph xml-lang="en-US" id="par_id191527781733238" role="paragraph">The function can have up to 255 arguments, meaning that you can specify 127 criteria ranges and criteria for them.</paragraph>
    <paragraph id="par_id175721789527973" role="warning" xml-lang="en-US">If a cell contains TRUE, it is treated as 1, if a cell contains FALSE – as 0 (zero).</paragraph>
</section>
</body>
</helpdocument>