Sams Teach Yourself StarOffice® 5 for Linux in 24 Hours

ContentsIndex

Hour 16: Formatting Your Spreadsheet

Previous HourNext Hour

Sections in this Hour:

 

Setting Number Formats in Cells


Formatting cells involves more than just the font and size of the numbers. Formatting also determines how numbers in cells are arranged according to the information they represent. For example, sales figures, scientific data, and baseball scores are all numbers. But they all look quite different.

Setting a number format for a cell determines how the number entered in that cell is displayed. StarOffice provides several convenient ways to select common formats, as well as more advanced features for less-used formats.

Using the Object Bar to Set Number Formats

For example, suppose you need to enter a set of sales numbers. You can enter a column of figures like the one shown in Figure 16.11.

Figure 16.11
A column of sales figures can be entered to represent dollar volumes.

But these don't look much like sales figures. Select the cells in which you entered the sales numbers. Now press the "money" button (StarOffice calls it the Currency button, but we like our name better). It looks like a little stack of coins on the Object Bar (see Figure 16.12).

Figure 16.12
The Currency button formats cells as dollar amounts.

The selected cells are immediately formatted with a dollar sign and two decimal places (see Figure 16.13).

Figure 16.13
A column of numbers can be formatted as dollar amounts with the currency button on the Object bar.

A similar button, next to the Currency button, formats numbers as percentages (for example, .56 is displayed as 56.00%).

Adjusting Decimal Places

One feature of number formatting that you might want to adjust for many types of figures is how many decimal places are displayed.

Two buttons on the Object Bar increase or decrease the number of decimal places on all selected cells. These buttons are shown in Figure 16.14.

Figure 16.14
The number of decimal places can be increased or decreased from these buttons on the Object Bar.

For example, enter this number in a cell, press Enter, and then click on the cell to give it focus again:


45

Now press the Increase decimal button (the one on the left in Figure 16.14) three times. The cell displays


45.000

Now type this number in the cell, press Enter, and click on the cell to give it focus again:


45.724

When you press Enter, the cell immediately displays


45.72

because the default cell setting is for two decimal places. If you press the Decrease decimal button twice, the cell displays


46

Notice that the number is rounded, not just cut off. Pressing the Decrease decimal button again has no effect because these buttons only round below the decimal point.

Using the Number Formatting Dialog Box

All these number formatting operations on the Object bar are actually shortcuts for things you can do from the Cell Attributes dialog box.

Open the Cell Attributes dialog box by selecting Cells... from the Format menu, and then selecting the Numbers tab (see Figure 16.15). From this dialog box you can set many options for how numbers are displayed.

Figure 16.15
Numbers can be formatted in many different ways within the Numbers tab of the Cell Attributes dialog box.

These options are as follows:

Tip - As with other StarOffice dialog boxes, a Preview window shows you how the current cell looks when formatted with the current selections in the Numbers tab.


Sams Teach Yourself StarOffice® 5 for Linux in 24 Hours

ContentsIndex

Hour 16: Formatting Your Spreadsheet

Previous HourNext Hour

Sections in this Hour: