1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements.  See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership.  The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License.  You may obtain a copy of the License at
12 *
13 *   http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied.  See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 *
22 ***********************************************************-->
23
24<helpdocument version="1.0">
25<meta>
26<topic id="textscalc0104060199xml" indexer="include" status="PUBLISH">
27<title id="tit" xml-lang="en-US">Operators in $[officename] Calc</title>
28<filename>/text/scalc/01/04060199.xhp</filename>
29</topic>
30</meta>
31<body>
32<bookmark xml-lang="en-US" branch="index" id="bm_id3156445">
33<bookmark_value>formulas; operators</bookmark_value>
34<bookmark_value>operators; formula functions</bookmark_value>
35<bookmark_value>division sign, see also operators</bookmark_value>
36<bookmark_value>multiplication sign, see also operators</bookmark_value>
37<bookmark_value>minus sign, see also operators</bookmark_value>
38<bookmark_value>plus sign, see also operators</bookmark_value>
39<bookmark_value>text operators</bookmark_value>
40<bookmark_value>comparisons;operators in Calc</bookmark_value>
41<bookmark_value>arithmetical operators</bookmark_value>
42<bookmark_value>reference operators</bookmark_value>
43</bookmark><comment>mw added 7 new index entries</comment>
44<paragraph role="heading" id="hd_id3156445" xml-lang="en-US" level="1" l10n="U" oldref="1">Operators in $[officename] Calc</paragraph>
45<paragraph role="paragraph" id="par_id3155812" xml-lang="en-US" l10n="U" oldref="2">You can use the following operators in $[officename] Calc:</paragraph>
46<paragraph role="heading" id="hd_id3153066" xml-lang="en-US" level="2" l10n="U" oldref="3">Arithmetical Operators</paragraph>
47<paragraph role="paragraph" id="par_id3148601" xml-lang="en-US" l10n="U" oldref="4">These operators return numerical results.</paragraph>
48<table id="tbl_id3151240">
49<tablerow>
50<tablecell colspan="" rowspan="">
51<paragraph role="tablehead" id="par_id3144768" xml-lang="en-US" l10n="U" oldref="5">Operator</paragraph>
52</tablecell>
53<tablecell colspan="" rowspan="">
54<paragraph role="tablehead" id="par_id3157982" xml-lang="en-US" l10n="U" oldref="6">Name</paragraph>
55</tablecell>
56<tablecell colspan="" rowspan="">
57<paragraph role="tablehead" id="par_id3159096" xml-lang="en-US" l10n="U" oldref="7">Example</paragraph>
58</tablecell>
59</tablerow>
60<tablerow>
61<tablecell colspan="" rowspan="">
62<paragraph role="tablecontent" id="par_id3149126" xml-lang="en-US" l10n="U" oldref="8">+ (Plus)</paragraph>
63</tablecell>
64<tablecell colspan="" rowspan="">
65<paragraph role="tablecontent" id="par_id3150892" xml-lang="en-US" l10n="U" oldref="9">Addition</paragraph>
66</tablecell>
67<tablecell colspan="" rowspan="">
68<paragraph role="tablecontent" id="par_id3153247" xml-lang="en-US" l10n="U" oldref="10">1+1</paragraph>
69</tablecell>
70</tablerow>
71<tablerow>
72<tablecell colspan="" rowspan="">
73<paragraph role="tablecontent" id="par_id3159204" xml-lang="en-US" l10n="U" oldref="11">- (Minus)</paragraph>
74</tablecell>
75<tablecell colspan="" rowspan="">
76<paragraph role="tablecontent" id="par_id3145362" xml-lang="en-US" l10n="U" oldref="12">Subtraction</paragraph>
77</tablecell>
78<tablecell colspan="" rowspan="">
79<paragraph role="tablecontent" id="par_id3153554" xml-lang="en-US" l10n="U" oldref="13">2-1</paragraph>
80</tablecell>
81</tablerow>
82<tablerow>
83<tablecell colspan="" rowspan="">
84<paragraph role="tablecontent" id="par_id3153808" xml-lang="en-US" l10n="U" oldref="14">- (Minus)</paragraph>
85</tablecell>
86<tablecell colspan="" rowspan="">
87<paragraph role="tablecontent" id="par_id3151193" xml-lang="en-US" l10n="U" oldref="15">Negation</paragraph>
88</tablecell>
89<tablecell colspan="" rowspan="">
90<paragraph role="tablecontent" id="par_id3154712" xml-lang="en-US" l10n="U" oldref="16">-5</paragraph>
91</tablecell>
92</tablerow>
93<tablerow>
94<tablecell colspan="" rowspan="">
95<paragraph role="tablecontent" id="par_id3149873" xml-lang="en-US" l10n="U" oldref="17">* (asterisk)</paragraph>
96</tablecell>
97<tablecell colspan="" rowspan="">
98<paragraph role="tablecontent" id="par_id3147504" xml-lang="en-US" l10n="U" oldref="18">Multiplication</paragraph>
99</tablecell>
100<tablecell colspan="" rowspan="">
101<paragraph role="tablecontent" id="par_id3149055" xml-lang="en-US" l10n="U" oldref="19">2*2</paragraph>
102</tablecell>
103</tablerow>
104<tablerow>
105<tablecell colspan="" rowspan="">
106<paragraph role="tablecontent" id="par_id3151341" xml-lang="en-US" l10n="U" oldref="20">/ (Slash)</paragraph>
107</tablecell>
108<tablecell colspan="" rowspan="">
109<paragraph role="tablecontent" id="par_id3159260" xml-lang="en-US" l10n="U" oldref="21">Division</paragraph>
110</tablecell>
111<tablecell colspan="" rowspan="">
112<paragraph role="tablecontent" id="par_id3153027" xml-lang="en-US" l10n="U" oldref="22">9/3</paragraph>
113</tablecell>
114</tablerow>
115<tablerow>
116<tablecell colspan="" rowspan="">
117<paragraph role="tablecontent" id="par_id3156396" xml-lang="en-US" l10n="U" oldref="23">% (Percent)</paragraph>
118</tablecell>
119<tablecell colspan="" rowspan="">
120<paragraph role="tablecontent" id="par_id3150372" xml-lang="en-US" l10n="U" oldref="24">Percent</paragraph>
121</tablecell>
122<tablecell colspan="" rowspan="">
123<paragraph role="tablecontent" id="par_id3145632" xml-lang="en-US" l10n="U" oldref="25">15%</paragraph>
124</tablecell>
125</tablerow>
126<tablerow>
127<tablecell colspan="" rowspan="">
128<paragraph role="tablecontent" id="par_id3149722" xml-lang="en-US" l10n="U" oldref="26">^ (Caret)</paragraph>
129</tablecell>
130<tablecell colspan="" rowspan="">
131<paragraph role="tablecontent" id="par_id3159127" xml-lang="en-US" l10n="U" oldref="27">Exponentiation</paragraph>
132</tablecell>
133<tablecell colspan="" rowspan="">
134<paragraph role="tablecontent" id="par_id3157873" xml-lang="en-US" l10n="U" oldref="28">3^2</paragraph>
135</tablecell>
136</tablerow>
137</table>
138<paragraph role="heading" id="hd_id3152981" xml-lang="en-US" level="2" l10n="U" oldref="29">Comparative operators</paragraph>
139<paragraph role="paragraph" id="par_id3157902" xml-lang="en-US" l10n="U" oldref="30">These operators return either true or false.</paragraph>
140<table id="tbl_id3148725">
141<tablerow>
142<tablecell colspan="" rowspan="">
143<paragraph role="tablehead" id="par_id3149889" xml-lang="en-US" l10n="U" oldref="31">Operator</paragraph>
144</tablecell>
145<tablecell colspan="" rowspan="">
146<paragraph role="tablehead" id="par_id3150743" xml-lang="en-US" l10n="U" oldref="32">Name</paragraph>
147</tablecell>
148<tablecell colspan="" rowspan="">
149<paragraph role="tablehead" id="par_id3146877" xml-lang="en-US" l10n="U" oldref="33">Example</paragraph>
150</tablecell>
151</tablerow>
152<tablerow>
153<tablecell colspan="" rowspan="">
154<paragraph role="tablecontent" id="par_id3148888" xml-lang="en-US" l10n="U" oldref="34">= (equal sign)</paragraph>
155</tablecell>
156<tablecell colspan="" rowspan="">
157<paragraph role="tablecontent" id="par_id3154845" xml-lang="en-US" l10n="U" oldref="35">Equal</paragraph>
158</tablecell>
159<tablecell colspan="" rowspan="">
160<paragraph role="tablecontent" id="par_id3154546" xml-lang="en-US" l10n="U" oldref="36">A1=B1</paragraph>
161</tablecell>
162</tablerow>
163<tablerow>
164<tablecell colspan="" rowspan="">
165<paragraph role="tablecontent" id="par_id3154807" xml-lang="en-US" l10n="U" oldref="37">&gt; (Greater than)</paragraph>
166</tablecell>
167<tablecell colspan="" rowspan="">
168<paragraph role="tablecontent" id="par_id3148580" xml-lang="en-US" l10n="U" oldref="38">Greater than</paragraph>
169</tablecell>
170<tablecell colspan="" rowspan="">
171<paragraph role="tablecontent" id="par_id3145138" xml-lang="en-US" l10n="U" oldref="39">A1&gt;B1</paragraph>
172</tablecell>
173</tablerow>
174<tablerow>
175<tablecell colspan="" rowspan="">
176<paragraph role="tablecontent" id="par_id3149507" xml-lang="en-US" l10n="U" oldref="40">&lt; (Less than)</paragraph>
177</tablecell>
178<tablecell colspan="" rowspan="">
179<paragraph role="tablecontent" id="par_id3150145" xml-lang="en-US" l10n="U" oldref="41">Less than</paragraph>
180</tablecell>
181<tablecell colspan="" rowspan="">
182<paragraph role="tablecontent" id="par_id3150901" xml-lang="en-US" l10n="U" oldref="42">A1&lt;B1</paragraph>
183</tablecell>
184</tablerow>
185<tablerow>
186<tablecell colspan="" rowspan="">
187<paragraph role="tablecontent" id="par_id3153078" xml-lang="en-US" l10n="U" oldref="43">&gt;= (Greater than or equal to)</paragraph>
188</tablecell>
189<tablecell colspan="" rowspan="">
190<paragraph role="tablecontent" id="par_id3150866" xml-lang="en-US" l10n="U" oldref="44">Greater than or equal to</paragraph>
191</tablecell>
192<tablecell colspan="" rowspan="">
193<paragraph role="tablecontent" id="par_id3153111" xml-lang="en-US" l10n="U" oldref="45">A1&gt;=B1</paragraph>
194</tablecell>
195</tablerow>
196<tablerow>
197<tablecell colspan="" rowspan="">
198<paragraph role="tablecontent" id="par_id3153004" xml-lang="en-US" l10n="U" oldref="46">&lt;= (Less than or equal to)</paragraph>
199</tablecell>
200<tablecell colspan="" rowspan="">
201<paragraph role="tablecontent" id="par_id3150335" xml-lang="en-US" l10n="U" oldref="47">Less than or equal to</paragraph>
202</tablecell>
203<tablecell colspan="" rowspan="">
204<paragraph role="tablecontent" id="par_id3148760" xml-lang="en-US" l10n="U" oldref="48">A1&lt;=B1</paragraph>
205</tablecell>
206</tablerow>
207<tablerow>
208<tablecell colspan="" rowspan="">
209<paragraph role="tablecontent" id="par_id3157994" xml-lang="en-US" l10n="U" oldref="49">&lt;&gt; (Inequality)</paragraph>
210</tablecell>
211<tablecell colspan="" rowspan="">
212<paragraph role="tablecontent" id="par_id3150019" xml-lang="en-US" l10n="U" oldref="50">Inequality</paragraph>
213</tablecell>
214<tablecell colspan="" rowspan="">
215<paragraph role="tablecontent" id="par_id3149878" xml-lang="en-US" l10n="U" oldref="51">A1&lt;&gt;B1</paragraph>
216</tablecell>
217</tablerow>
218</table>
219<paragraph role="heading" id="hd_id3145241" xml-lang="en-US" level="2" l10n="U" oldref="52">Text operators</paragraph>
220<paragraph role="paragraph" id="par_id3155438" xml-lang="en-US" l10n="U" oldref="53">The operator combines separate texts into one text.</paragraph>
221<table id="tbl_id3156061">
222<tablerow>
223<tablecell colspan="" rowspan="">
224<paragraph role="tablehead" id="par_id3150566" xml-lang="en-US" l10n="U" oldref="54">Operator</paragraph>
225</tablecell>
226<tablecell colspan="" rowspan="">
227<paragraph role="tablehead" id="par_id3153048" xml-lang="en-US" l10n="U" oldref="55">Name</paragraph>
228</tablecell>
229<tablecell colspan="" rowspan="">
230<paragraph role="tablehead" id="par_id3149001" xml-lang="en-US" l10n="U" oldref="56">Example</paragraph>
231</tablecell>
232</tablerow>
233<tablerow>
234<tablecell colspan="" rowspan="">
235<paragraph role="tablecontent" id="par_id3148769" xml-lang="en-US" l10n="U" oldref="57">&amp; (And)</paragraph>
236</tablecell>
237<tablecell colspan="" rowspan="">
238<bookmark xml-lang="en-US" branch="index" id="bm_id3157975">
239<bookmark_value>text concatenation AND</bookmark_value>
240</bookmark>
241<paragraph role="tablecontent" id="par_id3157975" xml-lang="en-US" l10n="U" oldref="58">text concatenation AND</paragraph>
242</tablecell>
243<tablecell colspan="" rowspan="">
244<paragraph role="tablecontent" id="par_id3157993" xml-lang="en-US" l10n="U" oldref="59">"Sun" &amp; "day" is "Sunday"</paragraph>
245</tablecell>
246</tablerow>
247</table>
248<paragraph role="heading" id="hd_id3153550" xml-lang="en-US" level="2" l10n="U" oldref="60">Reference operators</paragraph>
249<paragraph role="paragraph" id="par_id3149024" xml-lang="en-US" l10n="CHG" oldref="61">These operators return a cell range of zero, one or more cells.</paragraph>
250<paragraph role="paragraph" id="par_id2324900" xml-lang="en-US" l10n="NEW">Range has the highest precedence, then intersection, and then finally union.</paragraph>
251<table id="tbl_id3154633">
252<tablerow>
253<tablecell colspan="" rowspan="">
254<paragraph role="tablehead" id="par_id3158416" xml-lang="en-US" l10n="U" oldref="62">Operator</paragraph>
255</tablecell>
256<tablecell colspan="" rowspan="">
257<paragraph role="tablehead" id="par_id3152822" xml-lang="en-US" l10n="U" oldref="63">Name</paragraph>
258</tablecell>
259<tablecell colspan="" rowspan="">
260<paragraph role="tablehead" id="par_id3154949" xml-lang="en-US" l10n="U" oldref="64">Example</paragraph>
261</tablecell>
262</tablerow>
263<tablerow>
264<tablecell colspan="" rowspan="">
265<paragraph role="tablecontent" id="par_id3156257" xml-lang="en-US" l10n="U" oldref="65">: (Colon)</paragraph>
266</tablecell>
267<tablecell colspan="" rowspan="">
268<paragraph role="tablecontent" id="par_id3153924" xml-lang="en-US" l10n="U" oldref="66">Range</paragraph>
269</tablecell>
270<tablecell colspan="" rowspan="">
271<paragraph role="tablecontent" id="par_id3148432" xml-lang="en-US" l10n="U" oldref="67">A1:C108</paragraph>
272</tablecell>
273</tablerow>
274<tablerow>
275<tablecell colspan="" rowspan="">
276<paragraph role="tablecontent" id="par_id3152592" xml-lang="en-US" l10n="U" oldref="68">! (Exclamation point)</paragraph>
277</tablecell>
278<tablecell colspan="" rowspan="">
279<bookmark xml-lang="en-US" branch="index" id="bm_id3150606">
280<bookmark_value>intersection operator</bookmark_value>
281</bookmark>
282<paragraph role="tablecontent" id="par_id3150606" xml-lang="en-US" l10n="U" oldref="69">Intersection</paragraph>
283</tablecell>
284<tablecell colspan="" rowspan="">
285<paragraph role="tablecontent" id="par_id3083445" xml-lang="en-US" l10n="U" oldref="70">SUM(A1:B6!B5:C12)</paragraph>
286<paragraph role="tablecontent" id="par_id3150385" xml-lang="en-US" l10n="U" oldref="71">Calculates the sum of all cells in the intersection; in this example, the result yields the sum of cells B5 and B6.</paragraph>
287</tablecell>
288</tablerow>
289<tablerow>
290<tablecell colspan="" rowspan="">
291<paragraph role="tablecontent" id="par_id4003723" xml-lang="en-US" l10n="NEW">~ (Tilde)</paragraph>
292</tablecell>
293<tablecell colspan="" rowspan="">
294<paragraph role="tablecontent" id="par_id838953" xml-lang="en-US" l10n="NEW">Concatenation or union</paragraph>
295</tablecell>
296<tablecell colspan="" rowspan="">
297<paragraph role="tablecontent" id="par_id2511978" xml-lang="en-US" l10n="NEW">Takes two references and returns a reference list, which is a concatenation of the left reference followed by the right reference. Double entries are referenced twice. See note below this table.</paragraph>
298</tablecell>
299</tablerow>
300</table>
301<paragraph role="note" id="par_id181890" xml-lang="en-US" l10n="NEW">Reference concatenation using a tilde character was implemented lately. When a formula with the tilde operator exists in a document that is opened in old versions of the software, an error is returned. A reference list is not allowed inside an array expression.</paragraph>
302</body>
303</helpdocument>
304