StarOffice 9 Getting Started Guide
  Search only this book
Download this book in PDF (2072 KB)

Chapter 5 StarOffice Calc

StarOffice Calc is a spreadsheet program that you can use to calculate with data that contains text, numbers, date and time values, and more. In a network environment, Calc supports multiple users working in collaboration on the same sheet at the same time.

Opening a Sample Calc Spreadsheet

Calc main window

ProcedureTo Open a Sample Calc Spreadsheet

  1. In any StarOffice program, choose File->New->Templates and Documents

  2. In the left pane, click Samples.

  3. In the middle pane, double-click the Spreadsheets folder.

  4. Select a sample spreadsheet and click Open.

Spreadsheet Basics

By default, a spreadsheet document consists of three sheets: Sheet1, Sheet2, and Sheet3. Each sheet is divided into a maximum of 65536 rows and 1024 columns. Rows are labeled with numbers, while columns are labeled with letters. The intersection of a row and a column is called a cell.

A cell is identified by a reference that consists of the column letters of the cell followed by the row number of the cell. For example, the reference for a cell at the intersection of column A and row 2 is A2. The reference for the range of cells in columns A through C and rows 1 through 5 is A1:C5.

Calc cells with values and formula

You can also include the file name and the sheet name in a reference to a cell or to a cell range. You can assign a name to a cell or cell range so that you can use the name instead of a column/number reference. For details, search the application help for the term references.

Creating a Spreadsheet

To create a new spreadsheet from within any StarOffice program, choose File->New – Spreadsheet.

Navigating in a Sheet

You can use the mouse or the keyboard to navigate in a Calc sheet or to select items in the sheet.

ProcedureTo Navigate a Sheet With the Mouse

  1. Use the horizontal or vertical scrollbar to move sideways or up and down in a sheet.

    • Click the arrow on the horizontal or vertical scrollbar.

    • Click in the empty space on the scrollbar.

    • Drag the bar on the scrollbar.


    Tip –

    To move the cursor to a specific cell, click in the cell.


ProcedureTo Navigate a Sheet With the Keyboard

  1. Use the following keys and key combinations to move around in a sheet:

    • To move one cell down in a column, press the down arrow or Return.

    • To move one cell up in a column, press the up arrow.

    • To move one cell to the right, press the right arrow or Tab.

    • To move one cell to the left, press the left arrow.


    Tip –

    To move to the last cell that contains data in a column or row, hold down Control when you press an arrow key. To move to a cell by its address, enter the address in the Name Box above the column A.


ProcedureTo Select Cells in a Sheet

You can use the mouse or the keyboard to select cells in a Calc sheet.

  1. To select a range of cells with the mouse, click in a cell and drag the mouse to another cell.

    To select just one cell, Shift-click the cell.

    To select an entire row or column, click the label of the row or column.

    To select all cells, click the button above row 1 and left of column A.

  2. To select a range of cells with the keyboard, ensure that the cursor is in a cell, hold down Shift, and press an arrow key.

Entering Data

The simplest way to add data to a sheet is by typing, or by copying and pasting data from another Calc sheet or from another program.

ProcedureTo Enter Data in a Spreadsheet

  1. Click in the cell where you want to add your data.

  2. Provide the data.

    Either type the data, or to paste data from the clipboard into the cell, choose Edit->Paste.

  3. Press Return.

    You can also press an arrow key to enter the data and move to the next cell in the direction of the arrow.


    Tip –

    To type text on more than one line in a cell, press Control-Return at the end of each line, and then press Return when you are done.


ProcedureTo Quickly Enter Consecutive Dates and Numbers

Calc provides a fill feature so that you can quickly enter a successive series of data, such as dates, days, months, and numbers. The contents of each successive cell in the series is incremented by one. 1 is incremented to 2, Monday is incremented to Tuesday, and so on.

Calc filling cells by dragging
  1. Click in a cell.

  2. Type the first item of the series (for example Monday), and press Return.

  3. Click in the cell and drag the fill handle until you highlight the range of cells in which you want to enter the series.

    The fill handle is the small black box at the bottom right corner of the cell.

  4. Release the mouse button.

    The consecutive items in the series are automatically added to the highlighted cells.


    Tip –

    To copy without changing the values in a series, press the Control key while you drag.


Editing the Contents of Cells

You can edit the contents of a cell or cell range in a sheet.

ProcedureTo Edit the Contents of Cells in a Sheet

  1. Click in a cell or select a range of cells.

  2. To edit the contents of a single cell, double-click the cell and make the changes that you want.


    Tip –

    You can also click in the cell, type your changes in the Input line box of the Formula bar, and then click the green check mark icon. However, if you need multiline text with defined line breaks, you must double-click the cell and edit the contents inside the cell. Press Control-Return for a line break. You cannot enter line breaks in the Input line box.


    Calc converts your input to what seems most appropriate. If your input looks like a number, Calc formats it as a number. The same is true for input that looks like a date and time. Start your input with a leading single quote ' if you do not want the automatic conversion to a number or date.

  3. Press Return.

  4. To delete the contents of the cell or the cell range, press Backspace or Delete.

    Backspace deletes immediately, Delete first shows a dialog box.

Formatting Spreadsheets

You can format your sheet manually or by using styles. Manual formatting is only applied to the cells that you select. Style formatting is applied wherever the style is used in your spreadsheet document.

Formatting Cells Using AutoFormat

The easiest way to format a range of cells is to use the Calc AutoFormat feature.

ProcedureTo Apply Automatic Formatting to a Range of Cells

  1. Select the range of cells that you want to format.

    Select at least a range of 3 x 3 cells.

  2. Choose Format->AutoFormat.

    The AutoFormat dialog box appears.

  3. In the list of formats, click the format that you want to use, and then click OK.

Formatting Cells Manually

To apply simple formatting to the contents of a cell, such as changing the text size, use the icons on the Formatting toolbar.

Calc Formatting Toolbar

ProcedureTo Format Cells With the Formatting Toolbar

  1. Select the cell or cell ranges that you want to format.

  2. On the Formatting toolbar, click the icon that corresponds to the formatting that you want to apply, or select an option from the Font Name or Font Size drop-down lists.

ProcedureTo Apply Manual Formatting With the Format Cells Dialog Box

If you need more formatting options than the Calc Formatting toolbar provides, use the Format Cells dialog box.

  1. Select the cell or the range of cells that you want to format, and then choose Format->Cells.

    The Format Cells dialog box appears.

  2. Select one of the tabs and choose your formatting options.

    Numbers tab

    Provides options to change the formatting of numbers in cells, such as changing the number of decimal places that are displayed

    Font tab

    Provides options to change the font, font size, and typeface used in the cell

    Font Effects tab

    Provides options to change the color of the font, and the underline, strikethrough, or embossed effects of the text

    Alignment tab

    Provides options to change the text alignment and text orientation within cells

    Borders tab

    Provides options to change the border of cells

    Background tab

    Provides options to change the background fill of cells

    Cell Protection tab

    Provides options to protects cell contents inside protected sheets.

  3. Click OK.

Formatting Cells and Sheets With Styles

In Calc, the default formatting of cells and sheets is done with styles. A style is a set of formatting options, that defines the appearance of the cell contents as well as the layout of a sheet. When you change the formatting of a style, the changes are applied wherever the style is used in your spreadsheet.

ProcedureTo Apply Formatting With the Styles and Formatting Window

  1. Choose Format->Styles and Formatting.

  2. To change the formatting of cells: Click in a cell or select a range of cells.

    1. Click the Cell Styles icon at the top of the Styles and Formatting window.

    2. Double-click a style in the list

  3. To change the layout of a sheet: Click anywhere on the sheet.

    1. Click the Page Styles icon at the top of the Styles and Formatting window.

    2. Double-click a style in the list.

Using Formulas and Functions

You can insert formulas in a spreadsheet to perform calculations for you.

If the formula contains references to cells, the result is automatically updated whenever you change the content of the cells. You can also use one of the many predefined formulas or functions that Calc provides to perform your calculations.

Creating Formulas

A formula starts with an equal sign (=) and can contain values, cell references, operators, functions, and constants.

ProcedureTo Create a Formula

  1. Click in the cell where you want to display the result of the formula.

  2. Type =, and then type the formula.

    For example, if you want to add the contents of cell A1 to the contents of cell A2, type =A1+A2 in another cell.


    Tip –

    You can also start with the + or - key on the number keypad.


  3. Press Return.

Using Operators

You can use the following operators in your formulas.

Table 5–1 Operators for Calc Formulas

Operator 

Name 

Example 

Result 

Addition 

=1+1 

Subtraction 

=2–1 

Multiplication 

=7*9 

63 

Division 

=10/2 

Percent 

=15% 

15.00% 

Exponentiation 

=3^2 

Equal 

=8=8 

TRUE 

Greater than 

=7>9 

FALSE 

Less than 

=5<6 

TRUE 

>= 

Greater than or equal to 

=3>=4 

FALSE 

<= 

Less than or equal to 

=42<=63 

TRUE 

<> 

Not equal to 

=6<>4 

TRUE 

Text concatenation 

=“Sun” & “day” 

Sunday 


Example 5–1 Sample Calc Formulas

=A1+15

Displays the result of adding 15 to the contents of cell A1

=A1*20%

Displays 20 percent of the contents of cell A1

=A1*A2

Displays the result of multiplying the contents of cells A1 and A2


Using Parentheses

Calc follows the order of operations when it calculates a formula. Multiplication and division is done before addition or subtraction, regardless of where these operators appear in the formula. For example, for the formula =2+5+5*2, Calc returns the value of 17, and not 24.

Editing a Formula

A cell that contains a formula only displays the result of the formula. The formula is displayed in the Input line box.

ProcedureTo Edit a Formula

  1. Click in a cell that contains a formula.

    Alternatively, double-click a cell to edit the cell content directly.

    The formula is displayed in the Input line of the Formula Bar.

    Calc input line
  2. Click in the Input line and make your changes.

    To delete part of the formula press Delete or Backspace.

  3. Press Return or click Accept icon on the Formula Bar to accept the changes.

    To reject the changes that you made press Escape or click Cancel icon on the Formula Bar.

Using Functions

Calc comes with many predefined formulas or functions. For example, instead of typing =A2+A3+A4+A5, you can type =SUM(A2:A5). The Function Wizard assists in entering formulas with functions.

ProcedureTo Enter a Function

  1. Click the cell where you want to add a function.

  2. Choose Insert->Function.

    The Function Wizard dialog box opens.

  3. In the Category box, select the category that contains the type of function that you want to use.

  4. In the Functions list, select the function that you want to use.

  5. Click Next.

  6. Type any required values, or click the cells in the spreadsheet that contain the values that you want to use.

  7. Click OK.


    Tip –

    For more information on Calc functions, including examples, see the Calc help.


Using Charts

Charts can help you visualize patterns and trends in your numerical data. StarOffice 9 provides several chart styles that you can use to represent your numbers.

You can create a chart from numerical data in table cells of Calc or Writer. When the values in the cells change, the chart also changes automatically.

Chart inserted in Calc sheet
Note –

Charts are not restricted to spreadsheets. You can also insert a chart by choosing Insert->Object->Chart in the other StarOffice programs. These charts are inserted with some default data, and you can then provide your own data.


ProcedureTo Create a Chart

  1. Select the cells, including the headings, that contain the data for the chart.

    For a contiguous data area, you need only click into the area. No manual selection is necessary.

  2. Choose Insert->Chart.

    The Chart Wizard appears, showing a live preview of the chart using the current settings.

  3. Select a chart type.

  4. Click Finish.

Editing Charts

After you create a chart, you can change, move, resize, or delete the chart.

ProcedureTo Resize, Move, or Delete a Chart

  1. Select the chart.

    If the chart is not selected, click the chart once, so that you see eight big handles around the chart. If the chart is in edit mode, first click outside the chart, then click the chart.

  2. Resize, move, or delete the chart.

    • To resize the chart, move your mouse pointer over one of the big handles, hold down the mouse button, and drag the mouse.

      Calc displays a dotted outline of the new chart size as you drag.

    • To move the chart, move your mouse pointer inside the chart, hold down the mouse button, and drag the mouse to a new location.

    • To delete the chart, press Delete.

ProcedureTo Change the Appearance of a Chart

You can use the context menu inside a chart to change the properties of your chart.

  1. Double-click a chart to put it in edit mode.

  2. Right-click any chart element.

    A context menu is displayed.

  3. Choose a command to change the element.