OpenOffice.org OpenOffice - 3.3 Základní průvodce Strana 161

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 434
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 160
Error-checking formulas
Adding up columns of data or selections of cells from a worksheet often results in
errors due to omitting cells, wrongly specifying a range, or double-counting cells. It is
useful to institute checks in your spreadsheets. For example, set up a spreadsheet to
calculate columns of figures, and use SUM to calculate the individual column totals.
You can check the result by including (in a non-printing column) a set of row totals
and adding these together. The two figures—row total and column total—must agree.
If they do not, you have an error somewhere.
Figure 140: Error checking of formulas
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 140).
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 141.
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
Chapter 7 Using Formulas and Functions 161
Zobrazit stránku 160
1 2 ... 156 157 158 159 160 161 162 163 164 165 166 ... 433 434

Komentáře k této Příručce

Žádné komentáře