Formatting Tables


It is easy in Excel 2007 to make a table look really good. Just select any cell in the table, click the Design tab under Table Tools, and then select a style. The styles have several elements, and you can turn elements on or off at will. To see the full range of elements for the built-in styles, select all the check boxes in the Table Style Options group before selecting a style. The table in Figure 21-26 uses one of the Dark styles-Table Style Dark 6-because it shows the different elements quite clearly.

image from book
Figure 21-26: This example shows a Dark style, with all six of the Table Style Options selected.

As you clear different check boxes in the Table Style Options group, the appearance of the previews in the Table Styles list change accordingly. The Header Row and Total Row options are different from the other options in that turning them on or off actually changes the structure of the table, not just the format. If you want to have a header row or a total row but don't want a special format for it, you can customize the style, as explained in the next section.

The Banded Rows and Banded Columns options make every other row or column change colors. Including both tends to make the table a little busy. By default, the style definitions alternate one row (or column) dark with one row (or column) light. You can customize the number of rows (or columns in each band). The First Column and Last Column options are like the Header Row and Total Row options but for columns. Many times, as in Figure 21-26, the first column contains names or some other unique label and looks better with a distinct format. It is also often common-again, Figure 21-26 is an example-to have a total column at the right that deserves its own format.

In terms of formatting priority, the header row and total row have priority over any of the columnar formats. Next come the column formats-the First Column, Last Column, and Banded Columns options take precedence over Banded Rows. In cases such as our example, where you can still see banding on the rows even though the Banded Columns option is selected, it means that one of the column bands has no format applied, which lets the lowly row banding show.

Note 

If you do not see any changes when you apply a table style, you may have already applied cell formatting to the cells. If that's the case, right-click the Table Styles group on the Ribbon, and click Apply And Clear Formatting. If the format still doesn't work properly-for example, if the font does not change when you change styles-your workbook may have a customized Normal cell style. Make sure the Normal cell font is set to use the current theme's Body font.

Using Themes to Change Style Appearance

Styles are designed to be used with themes. A theme specifies two fonts: Heading and Body. Excel tables use the Body font for all the cells styled with the Table Styles list. Built-in Excel table styles also take advantage of the background/text colors and accent colors defined in the theme. This means you can easily change the look of a table by switching the theme or by changing the font or the colors of the current theme. Excel tables don't use the Effects component of a theme.

To dramatically change the look of a table by switching to a new theme, select any cell in the table, and then click the small arrow below the Themes button in the Themes group on the Page Layout tab. As you rest the pointer on the different themes, you can see the change in the table. Click the theme you like.

To change the color scheme of the current theme without changing the font, click the arrow to the right of the Colors button in the Themes group, and select a new color scheme. To select a new font without changing the colors, click the arrow to the right of the Fonts button in the Themes group. Remember that Excel tables use only the Body font style.

Note 

Technically, Excel table styles use the font from the cell style named Normal, and the default font for the Normal cell style is the Body font. If you change the Normal style to use a font that is not the heading or the totals, then the font will not change when you switch themes. If you want the Excel table styles to automatically use the Heading font rather than the Body font, then change the Normal style to use the current Heading font. Changing the Normal style will affect all unformatted cells in the workbook and also the row and column heading labels.

Customizing Table Styles

You can easily create your own style by cloning one of the built-in styles and then modifying its settings. To clone a style, on the Design tab under Table Tools, right-click any style, and click Duplicate. The Modify Table Quick Style dialog box, as shown in Figure 21-27, appears. With this dialog box, you can format individual elements of the style.

image from book
Figure 21-27: You can create your own styles by duplicating and modifying existing ones.

Most of the configurable elements relate directly to the check boxes in the Table Style Options group on the Design tab. If an item in the list is bold, it means that element has a custom format. If the item is not bold, it means the format of the "next layer down" will apply. So, for example, if you clear the formatting for Header Row, then the First Column and Last Column formats will apply to the first and last cells of the header row. (Note: Even if you clear the formatting for header and total rows, a default underlying style consists of the underlying table format plus a bold font; you can't clear that underlying style.)

When you select a modified style element-that is, one that is bold-you can see a brief description of what is different about the element, including the font style, the font theme color, the border definition, and whether there is a background shading.

Table 21-3: describes the table style elements. Table 21-3 The Elements of a Table Style
Open table as spreadsheet

Element

Description

Whole Table

Underlying style that applies to everything.

First Column Stripe

Applies only when the Banded Rows check box is selected. Formats the first column and then alternates with the Second Column Stripe format. Set Stripe Size to control how many columns will have this format before cycling to the Second Column Stripe format.

Second Column Stripe

Applies only when the Banded Rows check box is selected. Formats the alternate columns with the First Column Stripe format. Leave it unformatted to show the underlying formatting (including row stripes). Set Stripe Size to control how many columns will have this format before cycling back to the First Column Stripe format.

First Row Stripe

Same as First Column Stripe except applies to row banding.

Second Row Stripe

Same as Second Column Stripe except applies to row banding.

Last Column

Corresponds directly to the Last Column check box.

First Column

Corresponds directly to the First Column check box. Whether First Column is set or not, the First Column Stripe format applies to the same first column. In other words, this format hides the first column of the First Column Stripe format.

Header Row

Controls the formatting of the header row. The check box does not just toggle this format; it completely hides the header row.

Total Row

Corresponds to the Total Row check box.

First Header Cell

Formats the top-left cell of the table- where the header row and the first column intersect. It applies only if both the First Column and Header Row check boxes are selected.

Last Header Cell

Formats the top-right cell of the table if both the Header Row and Last Column check boxes are selected.

First Total Cell

Formats the bottom-left cell of the table if both the Total Row and First Column check boxes are selected.

Last Total Cell

Formats the bottom-right cell of the table if both the Total Row and Last Column check boxes are selected.

After you've created your customized style, it appears at the top of the gallery of styles. You can modify and delete only the styles you've created. After you create a style, you may need to click that style to apply it to the table.

To modify a table style element, right-click the custom style, and click Modify (if you're not already in the Modify Table Quick Style dialog box). Select the element you want to modify, and click Format. Click the tab for the element you want to modify-for example, to change the cell background, click the Fill tab. Select one of the theme colors, and click OK. Then select another element, or click OK to accept the format changes.

When you modify a table style, you cannot choose the font. The table style always uses the font from the Normal cell style (which defaults to the Body theme font). You can set the font style, size, and effects. When you modify a table style, it's a good idea to choose theme colors-or their tones and tints, not a custom color. If you choose a custom color, the color won't change when you switch to a new theme.




Microsoft Office Excel 2007 Inside Out
MicrosoftВ® Office ExcelВ® 2007 Inside Out (Inside Out (Microsoft))
ISBN: 073562321X
EAN: 2147483647
Year: 2004
Pages: 260

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