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:
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.
You can also create styles from scratch by using the Add button in the Style dialog box.
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.
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:
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.
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.
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:
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.
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.
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:
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.
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.)