Calc Guide
You can even set up a formula to calculate the difference between the
two totals and report an error in case a non-zero result is returned (see
Figure 124).
Creating formulas
You can enter formulas in two ways, either directly into the cell itself,
or at the input line. Either way, you need to start a formula with one of
the following symbols: =, + or –. Starting with anything else causes the
formula to be treated as if it were text.
Operators in formulas
Each cell on the worksheet can be used as a data holder or a place for
data calculations. Entering data is accomplished simply by typing in
the cell and moving to the next cell or pressing Enter. With formulas,
the equals sign indicates that the cell will be used for a calculation. A
mathematical calculation like 15 + 46 can be accomplished as shown
in Figure 125.
While the calculation on the left was accomplished in only one cell, the
real power is shown on the right where the data is placed in cells and
the calculation is performed using references back to the cells. In this
case, cells B3 and B4 were the data holders, with B5 the cell where the
calculation was performed. Notice that the formula was shown as
=B3+B4. The plus sign indicates that the contents of cells B3 and B4
are to be added together and then have the result in the cell holding
the formula. All formulas build upon this concept. Other ways of
entering formulas are shown in Table 7.
These cell references allow formulas to use data from anywhere in the
worksheet being worked on or from any other worksheet in the
workbook that is opened. If the data needed was in different
worksheets, they would be referenced by referring to the name of the
worksheet, for example =SUM(Sheet2.B12+Sheet3.A11).
Note
To enter the = symbol for a purpose other than creating a
formula as described in this chapter, type an apostrophe or
single quotation mark before the =. For example, in the entry '=
means different things to different people, Calc treats everything
after the single quotation mark—including the = sign—as text.
180 OpenOffice.org 3.x Calc Guide