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