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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<helpdocument version="1.0">
<meta>
<topic id="textscalc0104060199xml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">Operators in $[officename] Calc</title>
<filename>/text/scalc/01/04060199.xhp</filename>
</topic>
</meta>
<body>
<bookmark xml-lang="en-US" branch="index" id="bm_id3156445"><bookmark_value>formulas; operators</bookmark_value>
<bookmark_value>operators; formula functions</bookmark_value>
<bookmark_value>division sign, see also operators</bookmark_value>
<bookmark_value>multiplication sign, see also operators</bookmark_value>
<bookmark_value>minus sign, see also operators</bookmark_value>
<bookmark_value>plus sign, see also operators</bookmark_value>
<bookmark_value>text operators</bookmark_value>
<bookmark_value>comparisons;operators in Calc</bookmark_value>
<bookmark_value>arithmetical operators</bookmark_value>
<bookmark_value>reference operators</bookmark_value>
</bookmark><comment>mw added 7 new index entries</comment><h1 id="hd_id3156445">Operators in $[officename] Calc</h1>
<paragraph role="paragraph" id="par_id3155812" xml-lang="en-US">You can use the following operators in $[officename] Calc:</paragraph>
<h2 id="hd_id3153066">Arithmetical Operators</h2>
<paragraph role="paragraph" id="par_id3148601" xml-lang="en-US">These operators return numerical results.</paragraph>
<table id="tbl_id3151240">
<tablerow>
<tablecell>
<paragraph role="tablehead" id="par_id3144768" xml-lang="en-US">Operator</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id3157982" xml-lang="en-US">Name</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id401599494815994">Example</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3149126" xml-lang="en-US">+ (Plus)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3150892" xml-lang="en-US">Addition</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3153247" localize="false" xml-lang="en-US">1+1</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3159204" xml-lang="en-US">- (Minus)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3145362" xml-lang="en-US">Subtraction</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3153554" localize="false" xml-lang="en-US">2-1</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3153808" xml-lang="en-US">- (Minus)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3151193" xml-lang="en-US">Negation</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3154712" localize="false" xml-lang="en-US">-5</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3149873" xml-lang="en-US">* (asterisk)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3147504" xml-lang="en-US">Multiplication</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3149055" localize="false" xml-lang="en-US">2*2</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3151341" xml-lang="en-US">/ (Slash)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3159260" xml-lang="en-US">Division</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3153027" localize="false" xml-lang="en-US">9/3</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3156396" xml-lang="en-US">% (Percent)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3150372" xml-lang="en-US">Percent</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3145632" localize="false" xml-lang="en-US">15%</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3149722" xml-lang="en-US">^ (Caret)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3159127" xml-lang="en-US">Exponentiation</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3157873" localize="false" xml-lang="en-US">3^2</paragraph>
</tablecell>
</tablerow>
</table>
<note id="par_id881623862728559">Prefix "-" (negation) has a higher precedence than "^" (exponentiation). For example -3^2 equals 9, which is the square of a negative number.</note>
<h2 id="hd_id3152981">Comparative operators</h2>
<paragraph role="paragraph" id="par_id3157902" xml-lang="en-US">These operators return either true or false.</paragraph>
<table id="tbl_id3148725">
<tablerow>
<tablecell>
<paragraph role="tablehead" id="par_id3149889" xml-lang="en-US">Operator</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id3150743" xml-lang="en-US">Name</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id201599495083374">Example</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3148888" xml-lang="en-US">= (equal sign)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3154845" xml-lang="en-US">Equal</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3154546" localize="false" xml-lang="en-US">A1=B1</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3154807" xml-lang="en-US">> (Greater than)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3148580" xml-lang="en-US">Greater than</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3145138" localize="false" xml-lang="en-US">A1>B1</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3149507" xml-lang="en-US">< (Less than)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3150145" xml-lang="en-US">Less than</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3150901" localize="false" xml-lang="en-US">A1<B1</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3153078" xml-lang="en-US">>= (Greater than or equal to)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3150866" xml-lang="en-US">Greater than or equal to</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3153111" localize="false" xml-lang="en-US">A1>=B1</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3153004" xml-lang="en-US"><= (Less than or equal to)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3150335" xml-lang="en-US">Less than or equal to</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3148760" localize="false" xml-lang="en-US">A1<=B1</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3157994" xml-lang="en-US"><> (Inequality)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3150019" xml-lang="en-US">Inequality</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3149878" localize="false" xml-lang="en-US">A1<>B1</paragraph>
</tablecell>
</tablerow>
</table>
<h2 id="hd_id3145241">Text operators</h2>
<paragraph role="paragraph" id="par_id3155438" xml-lang="en-US">The operator combines separate texts into one text.</paragraph>
<table id="tbl_id3156061">
<tablerow>
<tablecell>
<paragraph role="tablehead" id="par_id3150566" xml-lang="en-US">Operator</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id3153048" xml-lang="en-US">Name</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id201599494708332">Example</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3148769" xml-lang="en-US">& (And)</paragraph>
</tablecell>
<tablecell>
<bookmark xml-lang="en-US" branch="index" id="bm_id3157975"><bookmark_value>text concatenation AND</bookmark_value>
</bookmark>
<paragraph role="tablecontent" id="par_id3157975" xml-lang="en-US">text concatenation AND</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3157993" xml-lang="en-US">"Sun" & "day" is "Sunday"</paragraph>
</tablecell>
</tablerow>
</table>
<h2 id="hd_id3153550">Reference operators</h2>
<paragraph role="paragraph" id="par_id3149024" xml-lang="en-US">These operators return a cell range of zero, one or more cells.</paragraph>
<paragraph role="paragraph" id="par_id2324900" xml-lang="en-US">Range has the highest precedence, then intersection, and then finally union.</paragraph>
<table id="tbl_id3154633">
<tablerow>
<tablecell>
<paragraph role="tablehead" id="par_id3158416" xml-lang="en-US">Operator</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id3152822" xml-lang="en-US">Name</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id521599494740206">Example</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3156257" xml-lang="en-US">: (Colon)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3153924" xml-lang="en-US">Range</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3148432" localize="false" xml-lang="en-US">A1:C108</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3152592" xml-lang="en-US">! (Exclamation point)</paragraph>
</tablecell>
<tablecell>
<bookmark xml-lang="en-US" branch="index" id="bm_id3150606"><bookmark_value>intersection operator</bookmark_value>
</bookmark>
<paragraph role="tablecontent" id="par_id3150606" xml-lang="en-US">Intersection</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3083445" xml-lang="en-US">SUM(A1:B6!B5:C12)</paragraph>
<paragraph role="tablecontent" id="par_id3150385" xml-lang="en-US">Calculates the sum of all cells in the intersection; in this example, the result yields the sum of cells B5 and B6.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id4003723" xml-lang="en-US">~ (Tilde)</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id838953" xml-lang="en-US">Concatenation or union</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id2511978" xml-lang="en-US">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>
</tablecell>
</tablerow>
</table>
<note id="par_id181890">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.</note>
</body>
</helpdocument>
|