Using Styles

If you routinely use the same formatting options for cells in your worksheets, you might want to consider creating a formatting style (a collection of formatting choices) that you can save with your workbook and use whenever you format information with the same attributes. After you create a new formatting style, or modify an existing one, you can use that style in any worksheet in your workbook, or you can copy the style to other open workbooks. In this section, you'll learn the following techniques:

  • How to create your own styles
  • How to apply existing styles
  • How to copy or merge styles from other workbooks

Creating Your Own Styles

Styles are created by using the Style command on the Format menu. When you choose Style, the Style dialog box appears, as shown in Figure 17-18.

If the cell you selected before choosing the Style command has not yet been formatted with a style, the Normal style will be displayed in the Style Name box. Excel predefines several styles in addition to the Normal style, including Comma, Currency, and Percent styles. If you want to modify one of these styles throughout the workbook, you select the style in the Style Name drop-down list box, click the Modify button, update the style using the tabs in the Format Cells dialog box, and click OK to return to the Style dialog box. When you click OK in the Style dialog box, the updated style will be changed throughout your workbook.

The easiest way to create a new style is by selecting a cell that has formatting you want to save, choosing the Style command, and giving the style a new name. This way of creating a style is called by example, because you use your own worksheet formatting to define the style.

TIP
You can also create styles from scratch by using the Add button in the Style dialog box.

click to view at full size.

FIGURE 17-18. You can use the Style dialog box to manage the formatting styles in your worksheet.

The following steps show you how to create a new style by example. The style we created is the vertically oriented column heading for Claude, shown in cell C3 in Figure 17-19. The heading is bold, dark blue, center-aligned, and rotated up 90 degrees in the cell. We call it Vertical Head.

click to view at full size.

FIGURE 17-19. To create a new style by example, you select a cell in your worksheet that has the formatting you want to save for the new style.

To create the Vertical Head style by example, follow these steps:

  1. Format the cell you want to create your style from. For example, you could use the Alignment tab of the Format Cells dialog box to center the text horizontally and change the orientation, and then use the Font tab to change the font style to bold and dark blue.
  2. Select the cell you just formatted.
  3. Choose Style from the Format menu.
  4. click to view at full size.

When a style option is deselected (there's no check mark in its check box), it means that any time you apply the associated style, the selected cells will keep their existing formatting for these categories.

TIP
To delete a custom style you no longer want, select the style in the Style Name drop-down list box, and click the Delete button.

Applying Existing Styles

To apply an existing style in your workbook, either a predefined style or one that you have created, select the cell or range of cells to which you want to apply the style, and then follow these steps:

  1. Choose Style from the Format menu to open the Style dialog box.
  2. click to view at full size.

Merging Styles from Other Workbooks

When you create a new style, you can use it only in the workbook where you create it—the new style is saved in the current workbook and won't appear in other workbooks. (This way, you won't mix up styles for your stock portfolio with those for your college expense budget.) However, you can copy or merge styles from other workbooks into the current workbook by using the Merge button in the Style dialog box.

CAUTION
Merging is a powerful tool, and you should use it with some caution. If the workbook you merge styles into has matching style names, the new styles can override your existing styles and be applied throughout your workbook.

TIP
Merging styles is a useful way to give your workbooks a consistent look. You can also use Excel templates (discussed in the next section) to format documents in a standard manner.

To merge styles from other Excel workbooks, follow these steps:

  1. Open the source workbook (the workbook you want to copy styles from) and the destination workbook (the workbook you want to copy the styles to).
  2. From the Window menu, click the destination workbook (its name should appear near the bottom of the Window menu) to make it the active window.
  3. From the Format menu, choose Style.
  4. Click the Merge button to display the Merge Styles dialog box shown below:
  5. Select the name of the workbook you want to copy styles from (the source workbook), and then click OK.

Excel copies all the styles from the source workbook to the destination workbook. If the source workbook contains formatting styles that have the same names as styles in the destination workbook, a warning message will appear asking whether you want to merge the styles anyway. If you click Yes, the styles will be merged and the source styles will be applied throughout the workbook.

WARNING
The Undo command does not reverse the effects of the Merge Styles dialog box. Be sure you want to copy over all the styles from the source workbook before you click the Merge button. (Remember that you can delete unwanted styles before the merge, by using the Delete button in the Style dialog box.)



Running Microsoft Office 2000 Small Business
Running Microsoft Office 2000
ISBN: 1572319585
EAN: 2147483647
Year: 2005
Pages: 228

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net