Sams Teach Yourself StarOffice® 5 for Linux in 24 Hours

ContentsIndex

Hour 16: Formatting Your Spreadsheet

Previous HourNext Hour

Sections in this Hour:

 

Adjusting and Inserting Rows and Columns


If you're like the rest of us, creating spreadsheets often includes discovering that you didn't leave enough space for your data, or that you left too much space between sections of your information.

Setting row height and column width enables you to fit the spreadsheet to the data that you've entered.

Inserting and removing rows and columns enables you to add or remove unused space to make your data fit the spreadsheet.

Adjusting Row Height and Column Width

Row height adjusts automatically to the tallest characters on the row. You can also adjust the height if you choose, however.

Column width, on the other hand, always has to be adjusted manually to accommodate longer numbers or text labels.

First, play with the row height. If you want to change the row height from the height that's automatically chosen, follow these steps:

1. Choose Row from the Format menu, and then Height from the Row submenu. The Height dialog box appears (see Figure 16.16).

2. Selecting default value changes the row height to the default of 0.19 inches.

3. Enter a new height value in the Height field.

4. Choose OK to apply the new height to the current row.

Tip - The Optimal Height dialog box enables you to add a little extra space to the automatic height of rows (based on font size). Choose Optimal Height from the Row submenu under the Format menu.


Figure 16.16
The Height dialog box enables you to adjust the row height as needed.

Setting column width to match the width of lines of text or numbers is more useful than setting new row heights. By setting the width to match your data, you can keep your spreadsheet looking good while also keeping track of how it will be printed (by using the Print Area and Fit to Page features).

If your columns aren't wide enough for the text that you enter in a cell, the text is simply cut off, often mid-character.

If your columns aren't wide enough for the numbers that you enter, or that are calculated from the formulas that you enter, StarOffice displays these characters in the cell:


###

The numbers are still stored in the cell, but you can't read them (onscreen or on paper) until you make the column wider. To see the value contained in an undersized cell, you must select that cell and read the Input line above the spreadsheet.

The easy method of adjusting the column width is to use the mouse. Follow these steps:

1. Move the mouse pointer to the right edge of the column letter label (see Figure 16.17).

Figure 16.17
Click on the right edge of the column label to adjust column width.

2. When the mouse pointer changes to a side-by-side double-headed arrow, click the mouse button and move it to the right for a wider column, or to the left for a narrower column.

Tip - A pop-up message tells you the width of the column as you resize it.


3. Release the mouse button.

Tip - If you select several columns before resizing, all the selected columns are resized to the same size.


Row height can be set in the same way by clicking and dragging on the row labels on the left edge of the screen.

Of course, using the mouse to adjust row and column size are only shortcuts. If you want to be precise, you can use the sizing dialog boxes under the Format menu. Choose either Row or Column and then Height (for Rows) or Width (for Columns). See Figure 16.18.

Figure 16.18
The Column Width dialog box enables you to reset the default width of a column or enter a specific numeric value for a column width.

In the Height and Width dialog boxes, you can reset the size to the default value with the checkbox, or you can enter a specific numeric value for the size of the row or column.

As with the mouse-driven procedure, all the selected rows or columns are affected when you use these dialog boxes.

Inserting and Deleting Rows

Although you can use copy and paste functions to move data around in a StarCalc spreadsheet, sometimes the easiest thing to do is to insert a row or column, rather than try to move everything to a new location.

Inserting a row is basically like using Cut and Paste to move the entire spreadsheet down one line. But it's a lot easier to just insert a row. In fact, you can insert several rows in one operation to give yourself more room in a section of your spreadsheet.

This example uses the spreadsheet shown in Figure 16.19. This Figure shows the Movie3 file from the samples/spreadsheets folder in the Explorer. You can load it and follow along.

Figure 16.19
A spreadsheet like this one might need extra rows inserted to accommodate additional data.

Suppose that you need to add information about several other cities to this table of movie statistics. You can insert additional rows by following these steps:

1. Click on the row label for row 9 (click on the 9).

2. Drag the mouse downward until three rows are selected (see Figure 16.20).

Tip - You can also select a cell in each of three rows, such as cells C9, C10, and C11. But selecting the entire row makes the data easier to keep track of.


3. Choose Rows from the Insert menu. The bottom half of the table moves down to add three rows in the middle (see Figure 16.21).

Notice a couple of things about this operation:

  • Formatting for the cells was maintained. This isn't always the case, but StarOffice tries to make the new rows look similar to the old rows.

  • The row numbers changed for the lower part of the table. Any formulas you entered in the lower part of the table (in row 9 or higher) were automatically updated by adding three to the row number.

Figure 16.20
You select the number of rows that you want to insert.

Figure 16.21
A table with three new rows inserted to accommodate additional information.

Caution - If you used an absolute row reference (with a dollar sign on the row, such as C$15), it won't be updated, and the formula might not calculate correctly.


Tip - If you select Rows from the Insert menu without doing anything else first (such as selecting other cells), StarOffice inserts one row above the current row.


Deleting rows is a little more complicated. Some of the details were covered earlier in this hour. Basically, you can do any of the following in a StarOffice spreadsheet:

  • Delete the contents of a block of cells (clear the cells).

  • Delete a block of cells, moving other cells up to fill in the space left by the cells you deleted (and updating formulas as needed).

  • Delete an entire row, moving other rows up and updating formulas.

Here, you'll just learn how to delete a complete row. Just follow these steps:

1. Select a complete row by clicking on the label for that row (on the far right of the row).

2. Choose Delete Cells from the Edit menu. The entire row is deleted and other cells are moved up and renumbered.

Tip - If you use Cut on the Edit menu, or the delete key, the cells are cleared but the empty cells remain in your spreadsheet.

Inserting and Deleting Columns

Inserting columns is done using the same procedure as inserting rows.

Caution - Some areas of a spreadsheet, for example where cells have been merged together, don't allow you to insert or delete rows or columns because doing so creates an ambiguous situation.


To insert a single column, choose Columns from the Insert menu. A single column is added to the left of the current cell.

You can also insert multiple columns by selecting several cells across a row. New columns are always inserted to the left of the currently selected cells.

As you probably suspect by now, deleting a column is similar to deleting a row:

1. Select the column to be deleted by clicking on the column label (the letter above the cells).

2. Choose Delete Cells from the Edit menu. The columns are removed.

Tip - You can choose Undo from the Edit menu if you delete information and then change your mind.


Sams Teach Yourself StarOffice® 5 for Linux in 24 Hours

ContentsIndex

Hour 16: Formatting Your Spreadsheet

Previous HourNext Hour

Sections in this Hour: