Table 7: Common ways to enter formulas
Formula Description
=A1+10 Displays the contents of cell A1 plus 10.
=A1*16% Displays 16% of the contents of A1.
=A1*A2 Displays the result of the multiplication of A1 and
A2.
=ROUND(A1;1) Displays the contents of cell A1 rounded to one
decimal place.
=EFFECTIVE(5%;12) Calculates the effective interest for 5% annual
nominal interest with 12 payments a year.
=B8-SUM(B10:B14) Calculates B8 minus the sum of the cells B10 to
B14.
=SUM(B8;SUM(B10:B14)) Calculates the sum of cells B10 to B14 and adds
the value to B8.
=SUM(B1:B65536) Sums all numbers in column B.
=AVERAGE(BloodSugar) Displays the average of a named range defined
under the name BloodSugar.
=IF(C31>140; "HIGH"; "OK") Displays the results of a conditional analysis of
data from two sources. If the contents of C31 is
greater than 140, then HIGH is displayed,
otherwise OK is displayed.
Note
Users of Lotus 1-2-3®, Quattro Pro® and other spreadsheet software
may be familiar with formulas that begin with +, -, =, (, @, ., $, or #. A
mathematical formula would look like +D2+C2 or +2*3. Functions
begin with the @ symbol such as @SUM(D2..D7),
@COS(@DEGTORAD(30)) and @IRR(GUESS;CASHFLOWS). Ranges are
identified such as A1..D3.
Functions can be identified in Table 7 with a word, for example ROUND, followed by
parentheses enclosing references or numbers.
It is also possible to establish ranges for inclusion by naming them using Insert >
Names, for example BloodSugar representing a range such as B3:B10. Logical
functions can also be performed as represented by the IF statement which results in
a conditional response based upon the data in the identified cell, for example
=IF(A2>=0;"Positive";"Negative")
A value of 3 in cell A2 would return the result Positive, –9 the result Negative.
Operator types
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative,
descriptive, text, and reference.
Chapter 7 Using Formulas and Functions 163
Komentáře k této Příručce