The graphics in a header or a footer extend into the data area of a worksheet in Excel (288966)



The information in this article applies to:

  • Microsoft Office Excel 2003
  • Microsoft Excel 2002

This article was previously published under Q288966

SYMPTOMS

Graphics placed in the header or footer intrude into the data area of the worksheet.

CAUSE

When you place images in a header or footer section, they are not automatically resized after being inserted. Nor are they resized when header or footer margins are subsequently changed.

RESOLUTION

You can resize images that you place in a header or footer section by using the Format Picture button in the Custom Header or Custom Footer dialog boxes.

MORE INFORMATION

You need to match the sizes of images that you place in worksheet headers or footers to the size of the header or footer area if the images are to be displayed properly and not obscure data in the body of the worksheet. You can do this either by adjusting the size of the header or footer area or resizing the image after you have placed it in that area.

When you put graphics in a header or footer, it is important to keep in mind the way in which the size of the header area is related to the dimensions of the Top Margin and the Header Margin, and the corresponding relationships for the Bottom Margin and the Footer Margin. At the top of the page, the actual amount of space available for text and graphics in the top margin is the difference between the Top Margin and Header Margin dimensions; the bottom margin behaves similarly.

To adjust the header area to a specific size, follow these steps:
  1. Start Microsoft Excel and in Cell A1 of a blank worksheet, type Data and then press ENTER.
  2. On the toolbar, click Print Preview, and if the margins are not visible, click Margins.

    Notice the two horizontal lines indicating the Header Margin and the Top Margin. The Top Margin is the one immediately above the word "Data".
  3. On the toolbar, click Setup and then on the Margins tab, type 1.8 in the Top box and 1.5 in the Header box, and then click OK.

    Notice the small area available for the worksheet's Header.
  4. On the toolbar, click Setup, and then on the Header/Footer tab, click Custom Header.NOTE: If the default sample file "Sample.jpg" is not available, you can use any .jpg file for the following steps, as long as the image is at least 2.21 inches in height and 2.95 inches in width.

  5. Click the Insert Picture button, double-click Sample.jpg (or your .jpg file), click OK and then click OK again for the Page Setup dialog.

    The image extends into the data area of the worksheet.
  6. Drag the Top Margin marker upward to increase the header area as much as possible.

    The header area still does not accommodate the image.
  7. On the toolbar, click Setup and then on the Margins tab, type 2 in the Top box and .5 in the Header box, and then click OK.

    Notice that this provides 1.5 inches of vertical space for the Header.
  8. On the toolbar, click Setup, click the Header/Footer tab, and then click Custom Header.
  9. Click the Format Picture button and type 1.5 in the Height box, click to select Lock aspect ratio and Relative to original picture size if they are not already selected, and then click OK.
  10. Click OK in the Header and Page Setup dialog boxes to return to Print Preview.

    The image now fits the header area.

REFERENCES

For additional information about putting images in headers or footers, click the following article number to view the article in the Microsoft Knowledge Base:

288964 HOW TO: Insert a Picture into the Header or Footer in Microsoft Excel 2002


Modification Type:MinorLast Reviewed:8/27/2004
Keywords:kbgraphic kbprb KB288966