Objective 2.3: Create and Modify Custom Workbook Elements (δείγμα)

  • 2.3.1. Create and modify cell styles
  • 2.3.2. Create custom themes and theme elements
  • 2.3.3. Create and modify simple macros
  • 2.3.4. Insert and configure form controls

OBJECTIVE 2.3: Contents

2.3.1. Create and modify cell styles

You can make it easier to format cells the way you want by creating a custom cell style, which is a combination of up to six formatting options: the number format; the horizontal and vertical alignment; the font, including the typeface, style, size, color, and text effects; the border; the background color and fill effects; and cell protection.

Excel comes with several dozen predefined cell styles, many of which vary with the document theme. However, Excel also has many cell styles that are independent of the current theme, including styles for sheet titles and headings, and styles that identify totals, calculations, and output cells.

Image

Cell styles can include a number format, alignment, font, borders, fill, and protection formatting

If none of the predefined cell styles is right for your needs, you can use the Format Cells dialog box to apply your own formatting. This dialog box has six tabs—Number, Alignment, Font, Border, Fill, and Protection—which correspond to the six cell style options. You can specify from one to all six style options.

If you want to reuse this formatting in other workbooks, you can save the formatting options as a custom cell style.

Image

Use the Format Cells dialog box to create a custom cell style


To create a custom cell style

1. On the Home tab, in the Styles group, click Cell Styles to open the Cell Styles gallery.

  • Tip: If you already have a cell that is formatted with some or all of the options you want to use in your custom cell style, select the cell before starting these steps. Excel uses the cell’s style options as the defaults for your new custom style.

2. Click New Cell Style to open the Style dialog box.

3. Enter a name for the style, and then click Format to display the Format Cells dialog box.

4. On the NumberAlignmentFontBorderFill, and Protection tabs of the dialog box, select the formatting options you want for your cell style.

5. Click OK to return to the Style dialog box.

6. Clear the check box for each of the style options that you don’t want to include in your custom style.

7. Click OK to save the custom style and display it in the Custom section of the Cell Styles gallery.


To modify a predefined cell style

1. In the Cell Styles gallery, right-click the cell style you want to change, and then click Modify to open the Style dialog box.

2. Click Format to open the Format Cells dialog box.

3. On the NumberAlignmentFontBorderFill, and Protection tabs of the dialog box, modify the formatting options for the cell style.

4. Click OK to return to the Style dialog box.

5. Clear the check box for each of the style options that you no longer want to include in the style.

6. Click OK to close the dialog box and return to the worksheet.