Page 210 - Excel 2007 Bible
P. 210

14_044039 ch10.qxp  11/21/06  11:03 AM  Page 167
                                             Understanding header and footer element codes
                                             When a header or footer section is activated, you can type whatever text you like into the section. Or, to
                                             insert variable information, you can insert any of several element codes by clicking a button in the Header
                                             & Footer Tools ➪ Design ➪ Header & Footer Elements group.
                                             For example, to insert the current date, click the Current Date button. Each of these buttons inserts a code
                                             into the selected section. Table 10.1 lists the buttons and their functions.
                                       TABLE 10.1
                                                                             Function
                                                         Code
                                       Button
                                       Page Number
                                                                             Displays the page number
                                                         &[Page]
                                       Number of Pages
                                                         &[Pages]
                                                                             Displays the total number of pages to be printed
                                       Current Date
                                                         &[Date]
                                                                             Displays the current date
                                                                             Displays the current time
                                                         &[Time]
                                       Current Time     Header & Footer Buttons and Their Functions    Printing Your Work    10
                                       File Path         &[Path]&[File]      Displays the workbook’s complete path and filename
                                       File Name         &[File]             Displays the workbook name
                                       Sheet Name        &[Tab]              Displays the sheet’s name
                                       Picture           Not applicable      Enables you to add a picture
                                       Format Picture    Not applicable      Enables you to change the picture’s settings
                                             You can combine text and codes and insert as many codes as you like into each section.
                                          NOTE
                                          NOTE         If the text that you enter uses an ampersand (&), you must enter the ampersand twice
                                                       (because Excel uses an ampersand to signal a code). For example, to enter the text Research &
                                            Development into a section of a header or footer, enter Research && Development.
                                             You also can use different fonts and sizes in your headers and footers. Just select the text that you want to
                                             change and then use the formatting tools in the Home ➪ Font group. Or use the controls on the Mini tool-
                                             bar, which appears automatically when you select the text. If you don’t change the font, Excel uses the font
                                             defined for the Normal style.
                                           TIP         You can use as many lines as you like. Press Enter to force a line break for multiline headers or
                                           TIP
                                                       footers. If you use multiline headers or footers, you may need to adjust the top or bottom mar-
                                            gin so the text won’t overlap with the worksheet data. See “Adjusting the page margins,” earlier in this
                                            chapter.
                                             Unfortunately, you can’t print the contents of a specific cell in a header or footer. For example, you may
                                             want Excel to use the contents of cell A1 as part of a header. To do so, you need to enter the cell’s contents
                                             manually — or write a macro to perform this operation.
                                                                                                                      167
   205   206   207   208   209   210   211   212   213   214   215