1<?xml version="1.0" encoding="UTF-8"?>
2
3
4
5<!--
6 ***********************************************************************
7 *
8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9 *
10 * Copyright 2000, 2010 Oracle and/or its affiliates.
11 *
12 * OpenOffice.org - a multi-platform office productivity suite
13 *
14 * This file is part of OpenOffice.org.
15 *
16 * OpenOffice.org is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU Lesser General Public License version 3
18 * only, as published by the Free Software Foundation.
19 *
20 * OpenOffice.org is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 * GNU Lesser General Public License version 3 for more details
24 * (a copy is included in the LICENSE file that accompanied this code).
25 *
26 * You should have received a copy of the GNU Lesser General Public License
27 * version 3 along with OpenOffice.org.  If not, see
28 * <http://www.openoffice.org/license.html>
29 * for a copy of the LGPLv3 License.
30 *
31 ************************************************************************
32 -->
33
34
35		<helpdocument version="1.0">
36<meta>
37<topic id="textscalcguideformulasxml" indexer="include" status="PUBLISH">
38<title id="tit" xml-lang="en-US">Calculating With Formulas</title>
39<filename>/text/scalc/guide/formulas.xhp</filename>
40</topic>
41</meta>
42<body>
43<bookmark xml-lang="en-US" branch="index" id="bm_id3155411"><bookmark_value>formulas;calculating with</bookmark_value>
44<bookmark_value>calculating; with formulas</bookmark_value>
45<bookmark_value>examples;formula calculation</bookmark_value>
46</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>
47</variable></paragraph>
48<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>
49<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>
50<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>
51<paragraph role="paragraph" id="par_id3156285" xml-lang="en-US" l10n="U" oldref="23">Here are a few examples of $[officename] Calc formulas:</paragraph>
52<table id="tbl_id3153878">
53<tablerow>
54<tablecell colspan="" rowspan="">
55<paragraph role="paragraph" id="par_id3154015" xml-lang="en-US" l10n="U" oldref="24">=A1+10</paragraph>
56</tablecell>
57<tablecell colspan="" rowspan="">
58<paragraph role="paragraph" id="par_id3146972" xml-lang="en-US" l10n="U" oldref="25">Displays the contents of cell A1 plus 10.</paragraph>
59</tablecell>
60</tablerow>
61<tablerow>
62<tablecell colspan="" rowspan="">
63<paragraph role="paragraph" id="par_id3145643" xml-lang="en-US" l10n="U" oldref="45">=A1*16%</paragraph>
64</tablecell>
65<tablecell colspan="" rowspan="">
66<paragraph role="paragraph" id="par_id3154255" xml-lang="en-US" l10n="U" oldref="46">Displays 16% of the contents of A1.</paragraph>
67</tablecell>
68</tablerow>
69<tablerow>
70<tablecell colspan="" rowspan="">
71<paragraph role="paragraph" id="par_id3146917" xml-lang="en-US" l10n="U" oldref="47">=A1 * A2</paragraph>
72</tablecell>
73<tablecell colspan="" rowspan="">
74<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>
75</tablecell>
76</tablerow>
77<tablerow>
78<tablecell colspan="" rowspan="">
79<paragraph role="paragraph" id="par_id3154022" xml-lang="en-US" l10n="U" oldref="26">=ROUND(A1;1)</paragraph>
80</tablecell>
81<tablecell colspan="" rowspan="">
82<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>
83</tablecell>
84</tablerow>
85<tablerow>
86<tablecell colspan="" rowspan="">
87<paragraph role="paragraph" id="par_id3150209" xml-lang="en-US" l10n="U" oldref="28">=EFFECTIVE(5%;12)</paragraph>
88</tablecell>
89<tablecell colspan="" rowspan="">
90<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>
91</tablecell>
92</tablerow>
93<tablerow>
94<tablecell colspan="" rowspan="">
95<paragraph role="paragraph" id="par_id3146114" xml-lang="en-US" l10n="U" oldref="33">=B8-SUM(B10:B14)</paragraph>
96</tablecell>
97<tablecell colspan="" rowspan="">
98<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>
99</tablecell>
100</tablerow>
101<tablerow>
102<tablecell colspan="" rowspan="">
103<paragraph role="paragraph" id="par_id3152890" xml-lang="en-US" l10n="U" oldref="35">=SUM(B8;SUM(B10:B14))</paragraph>
104</tablecell>
105<tablecell colspan="" rowspan="">
106<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>
107</tablecell>
108</tablerow>
109<comment>removed row with old row limit of 65536</comment>
110</table>
111<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>
112<section id="relatedtopics">
113<embed href="text/scalc/guide/formula_enter.xhp#formula_enter"/>
114<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>
115<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>
116</section>
117</body>
118</helpdocument>
119