Chapter 9. Worksheet Formatting Techniques

Formatting Fundamentals

Using Themes and Cell Styles

Formatting Conditionally

Formatting in Depth

Using Template Files to Store Formatting

WHEN creating a worksheet in Microsoft Excel 2010, you probably don’t ask yourself the question, why use formats? But we’ll answer it anyway. Compare Figure 9-1 to Figure 9-2, and we need say no more. Although the data is the same in both worksheets, the worksheet in Figure 9-2 takes advantage of the formatting features available in Excel 2010, and as you can see, it’s much easier to read and interpret. In this chapter, you’ll learn how to apply basic formatting to help turn your data into information. We also discuss advanced formatting features such as themes, cell styles, and conditional formatting.

All entries in this worksheet are displayed in their default formats.

Figure 9-1. All entries in this worksheet are displayed in their default formats.

The formatted worksheet is easier to read.

Figure 9-2. The formatted worksheet is easier to read.

Worksheet editing involves creating and modifying the content, layout, and organization of data, while worksheet formatting deals with the appearance and readability of that data. With formatting, you can take mind-numbing detail and turn it into information by highlighting the important stuff, adding visual cues and clues, and enhancing overall readability and organization. Be careful, though—over formatting can be as distracting as none at all. Usually, the goal of a good worksheet is to call attention to the right information, not to showcase Excel’s formatting features (or your mastery of them).

Formatting in Excel is easy: Select the cell or range, and use the appropriate buttons and commands on the ribbon to apply formatting. Many of the most often used formatting features appear on the Home tab on the ribbon for quick access, as shown in Figure 9-3. In fact, formatting commands dominate the Home tab; all seven of its ribbon groups include formatting commands (even the Editing group). Figure 9-3 also shows the Format Cells dialog box, which you can access by clicking the dialog box launcher in the Font, Alignment, or Number group on the Home tab on the ribbon. (The dialog box launcher is the small arrow icon to the right of the title in many ribbon groups.)

Here are some fundamental rules of formatting in Excel:

image with no caption

The concept of “tables” in Excel took on fresh meaning with the 2007 release, and it continues in the 2010 release. Tables are special objects in Excel that include many features beyond formatting, but you can use the Format As Table button on the Home tab to apply specific font, border, and fill attributes to all the elements of a table at once. The Format As Table gallery, shown in Figure 9-4, applies predefined combinations of these formatting criteria.

You can apply the Format As Table command to any region of cells (that is, a contiguous block of cells on a worksheet). You select a cell anywhere within the region, click Format As Table, and then select one of the sample table formats from the gallery. When you do, Excel displays the Format As Table dialog box, which lets you adjust the selection, as shown in Figure 9-5.

If your table includes headers (as most do), select the My Table Has Headers check box in the Format As Table dialog box. Excel then selects the entire table automatically and applies the selected table format to it.

Here are a few tips to keep in mind when using Format As Table:

Although Format As Table does a pretty good job with simple tables, you usually need to make a few adjustments afterward. For example, starting with the raw data shown in Figure 9-1, we applied the Table Style Light 4 format. Figure 9-6 shows the result.

As you can see in Figure 9-6, the title and subtitle in cells A1 and A2 were not part of the table, and therefore were not formatted, so we applied additional formatting manually to arrive at the result shown in Figure 9-2. In addition, we applied number formatting to the cells containing data. Nonetheless, using Format As Table speeds up the formatting process and provides at least one formatting feature that is otherwise unavailable: automatic row and column banding, which was one attribute of the automatic format we applied in Figure 9-6. Another cool part of using Format As Table is the automatic preview feature. After you define a table using the Format As Table command, you can then use the Format As Table gallery to preview other predefined formats. (It doesn’t work on raw data.) Rest the pointer on any format in the gallery, and the associated formatting is temporarily reflected in the table you have already created, but it is not actually applied unless you click.

After you create a table, a context-triggered tab appears on the ribbon only when you select a cell or cells within the table. Figure 9-7 shows the Table Tools Design tab.

The Design tab contains formatting commands in the Table Style Options and Table Styles groups. The latter group contains the same gallery as the Format As Table command on the Home tab. In Figure 9-7, we selected both the First Column and Last Column check boxes in the Table Style Options group, which in this particular predefined format applied bold formatting to the fonts in those columns. You can select and clear check boxes in this group and view the changes immediately. The Header Row check box actually adds or removes the header row from the table. The Total Row check box adds a double border at the bottom of the table and adds another row containing summary formulas. If you add the summary row, you can select which summary function you want to use by clicking the summary formula in the totals row and then clicking the menu arrow that appears. The menu offers a selection of functions—including Sum (the default), Average, Max, and Min—or you can select More Functions to display the Insert Function dialog box.

The two “Banded” check boxes on the Table Tools Design tab—Banded Rows and Banded Columns—are useful. In large worksheets, row banding often makes it easier to track long rows of data across a screen or printed page. In previous versions of Excel, banding required you to construct an esoteric conditional formatting formula using the MOD function. Banding is now easier than ever to apply in Excel thanks to these two options, and unlike the old MOD function approach, these table banding options are smart enough to survive just about any kind of editing, including inserting and deleting rows and columns.

You can insert and delete rows in a table, even at the edges, and the table automatically does the right thing with formats and formulas. Another great feature of tables is that you can make them bigger just by dragging. As Figure 9-8 shows, the cell in the lower-right corner of the table contains a small triangular indicator (similar to a cell comment indicator) that you can drag horizontally or vertically to increase (or decrease) the size of the table.