Chapter 7: Printing Your Work
7
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.
Each button inserts a code into the selected section. For example, to insert the current
date, click the Current Date button. Table 7.2 lists the buttons and their functions.
TA B LE 7. 2 Header and Footer Buttons and Their Functions
Button Code Function
Page Number &[Page] Displays the page number
Number of
Pages
&[Pages] Displays the total number of pages to be printed
Current Date &[Date] Displays the current date
Current Time &[Time] Displays the current time
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 &[Picture] Enables you to add a picture
Format Picture Not applicable Enables you to change an added picture’s settings
You can combine text and codes and insert as many codes as you like into each section.
If the text that you enter uses an ampersand (&), you must enter the ampersand twice (because Excel uses an amper-
sand to signal a code). For example, to enter the text Research & Development into a section of a header or footer,
type Research && Development.
You can also use different fonts and sizes in your headers and footers. Just select the text
you want to change and then use the formatting tools in the Home ➪ Font group. Or use
the controls on the Mini toolbar, which appears automatically when you select the text. If
you don’t change the font, Excel uses the font defined for the Normal style.
You can use as many lines as you like. Press Enter to force a line break for multiline headers or footers. If you use
multiline headers or footers, you may need to adjust the top or bottom margin so that the text won’t overlap with the
worksheet data. (See “Adjusting the page margins” earlier in this chapter.)