1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?>
2*b1cdbd2cSJim Jagielski
3*b1cdbd2cSJim Jagielski
4*b1cdbd2cSJim Jagielski
5*b1cdbd2cSJim Jagielski<!--***********************************************************
6*b1cdbd2cSJim Jagielski *
7*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
8*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
9*b1cdbd2cSJim Jagielski * distributed with this work for additional information
10*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
11*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
12*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
13*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
14*b1cdbd2cSJim Jagielski *
15*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
16*b1cdbd2cSJim Jagielski *
17*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
18*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
19*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
21*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
22*b1cdbd2cSJim Jagielski * under the License.
23*b1cdbd2cSJim Jagielski *
24*b1cdbd2cSJim Jagielski ***********************************************************-->
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielski
29*b1cdbd2cSJim Jagielski		<helpdocument version="1.0">
30*b1cdbd2cSJim Jagielski<meta>
31*b1cdbd2cSJim Jagielski<topic id="textscalcguideformulasxml" indexer="include" status="PUBLISH">
32*b1cdbd2cSJim Jagielski<title id="tit" xml-lang="en-US">Calculating With Formulas</title>
33*b1cdbd2cSJim Jagielski<filename>/text/scalc/guide/formulas.xhp</filename>
34*b1cdbd2cSJim Jagielski</topic>
35*b1cdbd2cSJim Jagielski</meta>
36*b1cdbd2cSJim Jagielski<body>
37*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="index" id="bm_id3155411"><bookmark_value>formulas;calculating with</bookmark_value>
38*b1cdbd2cSJim Jagielski<bookmark_value>calculating; with formulas</bookmark_value>
39*b1cdbd2cSJim Jagielski<bookmark_value>examples;formula calculation</bookmark_value>
40*b1cdbd2cSJim Jagielski</bookmark><comment>mw changed "formulas;..." entry and addes "examples;..." entry</comment><paragraph role="heading" id="hd_id3155411" xml-lang="en-US" level="1" l10n="U" oldref="20"><variable id="formulas"><link href="text/scalc/guide/formulas.xhp" name="Calculating With Formulas">Calculating With Formulas</link>
41*b1cdbd2cSJim Jagielski</variable></paragraph>
42*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3156281" xml-lang="en-US" l10n="CHG" oldref="21">All formulas begin with an equals sign. The formulas can contain numbers, text, arithmetic operators, logic operators, or functions.</paragraph>
43*b1cdbd2cSJim Jagielski<paragraph role="tip" id="par_id3145272" xml-lang="en-US" l10n="CHG" oldref="39">Remember that the basic arithmetic operators (+, -, *, /) can be used in formulas using the "Multiplication and Division before Addition and Subtraction" rule. Instead of writing =SUM(A1:B1) you can write =A1+B1.</paragraph>
44*b1cdbd2cSJim Jagielski<paragraph role="tip" id="par_id3146119" xml-lang="en-US" l10n="U" oldref="42">Parentheses can also be used. The result of the formula =(1+2)*3 produces a different result than =1+2*3.</paragraph>
45*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3156285" xml-lang="en-US" l10n="U" oldref="23">Here are a few examples of $[officename] Calc formulas:</paragraph>
46*b1cdbd2cSJim Jagielski<table id="tbl_id3153878">
47*b1cdbd2cSJim Jagielski<tablerow>
48*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
49*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3154015" xml-lang="en-US" l10n="U" oldref="24">=A1+10</paragraph>
50*b1cdbd2cSJim Jagielski</tablecell>
51*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
52*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3146972" xml-lang="en-US" l10n="U" oldref="25">Displays the contents of cell A1 plus 10.</paragraph>
53*b1cdbd2cSJim Jagielski</tablecell>
54*b1cdbd2cSJim Jagielski</tablerow>
55*b1cdbd2cSJim Jagielski<tablerow>
56*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
57*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3145643" xml-lang="en-US" l10n="U" oldref="45">=A1*16%</paragraph>
58*b1cdbd2cSJim Jagielski</tablecell>
59*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
60*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3154255" xml-lang="en-US" l10n="U" oldref="46">Displays 16% of the contents of A1.</paragraph>
61*b1cdbd2cSJim Jagielski</tablecell>
62*b1cdbd2cSJim Jagielski</tablerow>
63*b1cdbd2cSJim Jagielski<tablerow>
64*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
65*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3146917" xml-lang="en-US" l10n="U" oldref="47">=A1 * A2</paragraph>
66*b1cdbd2cSJim Jagielski</tablecell>
67*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
68*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3146315" xml-lang="en-US" l10n="U" oldref="48">Displays the result of the multiplication of A1 and A2.</paragraph>
69*b1cdbd2cSJim Jagielski</tablecell>
70*b1cdbd2cSJim Jagielski</tablerow>
71*b1cdbd2cSJim Jagielski<tablerow>
72*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
73*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3154022" xml-lang="en-US" l10n="U" oldref="26">=ROUND(A1;1)</paragraph>
74*b1cdbd2cSJim Jagielski</tablecell>
75*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
76*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150363" xml-lang="en-US" l10n="CHG" oldref="27">Displays the contents of cell A1 rounded to one decimal place.</paragraph>
77*b1cdbd2cSJim Jagielski</tablecell>
78*b1cdbd2cSJim Jagielski</tablerow>
79*b1cdbd2cSJim Jagielski<tablerow>
80*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
81*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150209" xml-lang="en-US" l10n="U" oldref="28">=EFFECTIVE(5%;12)</paragraph>
82*b1cdbd2cSJim Jagielski</tablecell>
83*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
84*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150883" xml-lang="en-US" l10n="U" oldref="29">Calculates the effective interest for 5% annual nominal interest with 12 payments a year.</paragraph>
85*b1cdbd2cSJim Jagielski</tablecell>
86*b1cdbd2cSJim Jagielski</tablerow>
87*b1cdbd2cSJim Jagielski<tablerow>
88*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
89*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3146114" xml-lang="en-US" l10n="U" oldref="33">=B8-SUM(B10:B14)</paragraph>
90*b1cdbd2cSJim Jagielski</tablecell>
91*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
92*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3154486" xml-lang="en-US" l10n="U" oldref="34">Calculates B8 minus the sum of the cells B10 to B14.</paragraph>
93*b1cdbd2cSJim Jagielski</tablecell>
94*b1cdbd2cSJim Jagielski</tablerow>
95*b1cdbd2cSJim Jagielski<tablerow>
96*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
97*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3152890" xml-lang="en-US" l10n="U" oldref="35">=SUM(B8;SUM(B10:B14))</paragraph>
98*b1cdbd2cSJim Jagielski</tablecell>
99*b1cdbd2cSJim Jagielski<tablecell colspan="" rowspan="">
100*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3159171" xml-lang="en-US" l10n="U" oldref="36">Calculates the sum of cells B10 to B14 and adds the value to B8.</paragraph>
101*b1cdbd2cSJim Jagielski</tablecell>
102*b1cdbd2cSJim Jagielski</tablerow>
103*b1cdbd2cSJim Jagielski<comment>removed row with old row limit of 65536</comment>
104*b1cdbd2cSJim Jagielski</table>
105*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150109" xml-lang="en-US" l10n="U" oldref="30">It is also possible to nest functions in formulas, as shown in the example. You can also nest functions within functions. The Function Wizard assists you with nested functions.</paragraph>
106*b1cdbd2cSJim Jagielski<section id="relatedtopics">
107*b1cdbd2cSJim Jagielski<embed href="text/scalc/guide/formula_enter.xhp#formula_enter"/>
108*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3150213" xml-lang="en-US" l10n="U" oldref="44"><link href="text/scalc/01/04060100.xhp" name="Functions list">Functions list</link></paragraph>
109*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3152869" xml-lang="en-US" l10n="U" oldref="43"><link href="text/scalc/01/04060000.xhp" name="AutoPilot: Functions">Function Wizard</link></paragraph>
110*b1cdbd2cSJim Jagielski</section>
111*b1cdbd2cSJim Jagielski</body>
112*b1cdbd2cSJim Jagielski</helpdocument>
113