18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Printing Your Work 10<br />

Understanding header and footer element codes<br />

When a header or footer section is activated, you can type whatever text you like into the section. Or, to<br />

insert variable information, you can insert any of several element codes by clicking a button in the Header<br />

& Footer Tools ➪ Design ➪ Header & Footer Elements group.<br />

For example, to insert the current date, click the Current Date button. Each of these buttons inserts a code<br />

into the selected section. Table 10.1 lists the buttons and their functions.<br />

TABLE 10.1<br />

Header & Footer Buttons and Their Functions<br />

Button Code Function<br />

Page Number &[Page] Displays the page number<br />

Number of Pages &[Pages] Displays the total number of pages to be printed<br />

Current Date &[Date] Displays the current date<br />

Current Time &[Time] Displays the current time<br />

File Path &[Path]&[File] Displays the workbook’s complete path and filename<br />

File Name &[File] Displays the workbook name<br />

Sheet Name &[Tab] Displays the sheet’s name<br />

Picture Not applicable Enables you to add a picture<br />

Format Picture Not applicable Enables you to change the picture’s settings<br />

You can combine text and codes and insert as many codes as you like into each section.<br />

If the text that you enter uses an ampersand (&), you must enter the ampersand twice<br />

(because Excel uses an ampersand to signal a code). For example, to enter the text Research &<br />

Development into a section of a header or footer, enter Research && Development.<br />

NOTE<br />

You also can use different fonts and sizes in your headers and footers. Just select the text that you want to<br />

change and then use the formatting tools in the Home ➪ Font group. Or use the controls on the Mini toolbar,<br />

which appears automatically when you select the text. If you don’t change the font, Excel uses the font<br />

defined for the Normal style.<br />

TIP<br />

You can use as many lines as you like. Press Enter to force a line break for multiline headers or<br />

footers. If you use multiline headers or footers, you may need to adjust the top or bottom margin<br />

so the text won’t overlap with the worksheet data. See “Adjusting the page margins,” earlier in this<br />

chapter.<br />

Unfortunately, you can’t print the contents of a specific cell in a header or footer. For example, you may<br />

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<br />

manually — or write a macro to perform this operation.<br />

167

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!