Visually separate headers and footers from worksheet data with horizontal rules

by Sean Kavanagh

Application:

Microsoft Excel 2000/2002/2003/2004/2007

Operating Systems:

Microsoft Windows, Macintosh

 

I like to include headers and footers in my Excel worksheets to make better printouts. But sometimes the headers and footers can crowd my worksheet data. In Word, I can separate my headers and footers from a document with a horizontal rule. Can I do the same thing in Excel?

 

Rita Jenson

Accounts Payable clerk

Nashville, Tenn.

 

You can easily use a line to separate a header or footer from the main body of a Microsoft Word document, but you may not have found the process as easy in Excel. If you resort to adding a border line to the cells at the beginning or end of each new page, you’re going to a lot more effort than is required. In this article, we’ll look at some more efficient ways to approach this problem so you don’t need to create custom borders for every page.

 

The technique lineup

We’ll look at a few ways to create lines that span a header or footer section. However, before looking at the techniques, we’ll review the basics of creating a custom header or footer. Then, we’ll show you how to use the underscore character to draw lines across the header or footer section. Next, we’ll look at two ways to combine both text and a line in your header or footer. Finally, we’ll show you how Excel 2002 and later lets you add lines that are more visually appealing using a line graphic to separate a worksheet header from the information in the sheet’s cells.

 

Create a custom header or footer

Using Excel’s built-in options, you can automatically insert pieces of text like the page number, date, filename, and so on into the headers or footers. However, there’s no provision to insert lines using these built-in options; instead, you must rely on workaround solutions. The first step is to create a custom header or footer.

 

To build a custom header or footer:

1.       Select View | Header And Footer from the menu bar.

2.      In the Page setup dialog box, the Header/Footer tab is already selected. You can create a custom header or footer by clicking on the Custom Header or Custom Footer button shown in Figure A.

 

A:

You can create custom headers or footers using the Custom Header and Custom Footer buttons in the Page Setup dialog box.

 

Use underscores to draw lines

We’ll begin by drawing a line in the sheet header and footer using the underscore character.

 

To create a line made of underscore characters:

1.       Click the Custom Header button.

2.      In the Header dialog box, as shown in Figure B, click in the Left Section text area and enter a string of underscore characters. Click OK.

3.      In the Page Setup dialog box, click Custom Footer.

4.      Repeat step 2 in the Footer dialog box and then click OK.

5.      In the Page Setup dialog box, click Print Preview.

 

Join Now Close