Sams Teach Yourself StarOffice® 5 for Linux in 24 Hours |
![]() |
|||||||||||||
Hour 15: Using Formulas, Functions, and Names |
![]() |
|||||||||||||
|
In this hour you will learn about using formulas and functions to add useful information to your StarCalc spreadsheets. This hour explains the different functions available in StarOffice, as well as how to use calculation preferences to determine how those functions are used by StarOffice.
The formulas in a spreadsheet are what make it more useful than a pencil and paper. This hour demonstrates how to use simple formulas, and it shows several functions that you can use for regular and specialized applications.
Every cell in a spreadsheet can contain one of the following three types of data:
A number (digits that you enter in the cell)
Text (called a label)
A formula (something that requires computation by StarOffice to reach a value that is displayed)
Most of this hour discusses using formulas. Formulas are entered into a cell to make StarOffice calculate something. They're what gives a spreadsheet its real power.
In Hour 14, "Entering Spreadsheet Data," cells in a spreadsheet are defined as a letter-number combination that refer to a row and column in the spreadsheet. For example, one cell is
D13
or, using an absolute reference (of which you'll see an example in this hour), the same cell is
$D$13
A range of cells (a rectangular block) is referenced as follows:
D13:R55
Hour 14 also describes how to assign a name to a cell or a block of cells (a range). You'll use ranges later in this hour.
How does StarOffice determine what type of information a cell contains? A few simple rules are all it takes:
If a cell contains only numbers (digits), it's a number.
If a cell contains anything else (letters), it's a label.
If a cell starts with an equal sign (=), it's a formula, and it needs to be evaluated to reach a value.
Open a new spreadsheet and enter some information to see how all this works:
1. Click on cell B5 to place the focus on that cell.
2. Type the word Sale and press Enter. Notice as you type that the information you type appears both in the cell (B5) and above all the cells on the Input Line (see Figure 15.1).
3. When you press Enter, the cursor moves to the cell below.
Figure
15.1
Information that you type is shown in the cell and on the Input Line.
Tip - You can change which direction the focus moves when you press Enter. Go to the Spreadsheet Options dialog box (choose Options under the Tools menu); the Input tab contains this option. |
4. Now type the number 2450 (in cell B6, where you now are) and press Enter.
5. Repeat this process, selecting any numbers you want, to enter numbers in the next four cells. The spreadsheet looks similar to Figure 15.2, with a total of five numbers entered in a column.
Figure
15.2
A new spreadsheet with a label and a few numbers entered.
By starting with this type of information, you can experiment with some formulas. First, however, you need to know how to edit a cell.
Often, you'll need to return to a cell in which you've previously entered information and make a change.
If you move the focus to a cell and start typing, you'll erase the contents of the cell and replace them with what you're typing. This can be a waste of time if you want to preserve most of the cell's contents.
You have to tell StarOffice that you want to edit the cell contents instead of replacing them. To do this, press the F2 key. You'll see that the focus outline around the current cell disappears, and a cursor appears in the cell.
Tip - You can also double-click on a cell to begin editing its contents. |
When you've finished editing the cell contents, press Enter or click the mouse pointer in another cell.
Tip - In the next section you start using formulas. When you press F2 to edit a cell that contains a formula, the formula, rather than the number that was calculated from the formula, is displayed for you to edit. |
Sams Teach Yourself StarOffice® 5 for Linux in 24 Hours |
![]() |
|||||||||||||
Hour 15: Using Formulas, Functions, and Names |
![]() |
|||||||||||||
|
© Copyright Macmillan USA. All rights reserved.