MS-Excel / Excel 2003

Headers and footers made to order

The Header/Footer tab of the Page Setup dialog box contains the controls for defining or removing a header and footer from the printed report. The header contains the information that you want printed at the top of every page of the report, and the footer contains the information that you want printed at the bottom of each page. Note that Excel doesn't automatically assign either a header or footer when you first print a report from a workbook.

When assigning a header or footer for your report, you can either select one of the stock headings (such as those that print the current page number or date, or those that print the name of the workbook or worksheet, and so forth) or create a custom heading of your own. To select a stock heading on the Header/Footer tab, click the heading in the Header and/or Footer drop-down list box to replace the default setting of (none).

To create a custom heading for the header and/or footer, click the Custom Header or Custom Footer button on this tab to open the respective Header or Footer dialog box.

When you create a custom header or footer, you can mix your text with stock information, such as the current page number, total number of pages, date, path to the folder containing the file, workbook filename, and worksheet name. To do this, click the insertion point in the section where you want to add text and then type your text interspersed with the stock information whose code you insert. To insert the code for a piece of stock information, click the appropriate button in the Header or Footer dialog box.

Table below shows you the codes that Excel inserts into the text of your custom header or footer when you click the various buttons in the Header or Footer dialog box. Note that when you click the Font button, Excel opens the Font dialog box where you can select a new font, font size, or font style for the selected text without inserting any codes into the current section of the custom header or footer.

Header and Footer Codes
ButtonCodesWhat it Does
Page Number&[Pages]Inserts current page number
Total Pages&[File]Inserts the total number of pages
Date&[Date]Inserts current date in the form 9/15/04
Time&[Time]Inserts current time in the form 10:02 AM
Path&[Path]Inserts the complete pathname for the file in the form C:\mydocuments\finances\budget04
Filename&[File]Inserts the workbook filename
Sheet&[Tab]Inserts the worksheet name
Picture&[Picture]Inserts the graphic imageyou select

Also note that when you click the Picture button, Excel opens the Insert Picture dialog box, where you choose the graphics file whose image you want to appear in the header or footer (normally a logo or other mark that fits well within the top or bottom margin). This file is represented in the header or footer by the &[Picture] code. When you click the Format Picture button (available only after you've inserted the &[Picture] code in the header or footer), Excel opens the Format Picture dialog box, which enables you to modify the image's size and appearance.

Print titles on every page

You can use the text boxes in the Print Titles section on the Sheet tab of the Page Setup dialog box to add row and column headings from tables in a worksheet as headings that appear on each page of the report. Select the Rows to Repeat at Top text box and then select the row(s) in the worksheet that contain the column headings you want to appear in the upper portion of each page. Select the Columns to Repeat at Left text and then select the column(s) in the worksheet that contain the row headings you want to appear on the left side of each page.

[Previous] [Contents] [Next]