Microsoft KB Archive/214012

= How to set print areas and print titles on a worksheet =

Article ID: 214012

Article Last Modified on 1/24/2007

-

APPLIES TO


 * Microsoft Office Excel 2003
 * Microsoft Excel 2002 Standard Edition
 * Microsoft Excel 2000 Standard Edition
 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q214012



For a Microsoft Excel 97 and earlier version of this article, see 121401.



SUMMARY
This article describes different methods that you can use in Microsoft Excel to set a print title and a print area on your worksheet.



Print Area Menu Item
In Excel, there is a Print Area menu item on the File menu.

To set the print area on your worksheet using the Print Area menu item, follow these steps:


 * 1) Start Excel.
 * 2) Select the range of cells that you want to set as your print area.
 * 3) On the File menu, point to Print Area, and then click Set Print Area.

NOTE: You can clear an existing print area by repeating steps 1 through 3, and then clicking Clear Print Area instead of Set Print Area.

Page Setup
You can use the Sheet tab of the Page Setup dialog box to set either a print area or a print title on your worksheet.

To display the Page Setup dialog box, click Page Setup on the File menu.

NOTE: Although you can access the Page Setup dialog box by clicking the Setup button in Print Preview, you cannot enter a print area or print title by using this method.

To set the print area or print title, follow these steps:
 * 1) In the Page Setup dialog box, click the Sheet tab.
 * 2) In the Print Area box, type the reference of the cells that you want to use as your print area, such as A1:B9.
 * 3) Under Print titles, in the Rows to repeat at top box, type the reference to the row or rows that you want to set as a title, for example, $1:$1 for row 1.
 * 4) In the Columns to repeat at left box, type the reference to the column or columns that you want to set as a title, for example, $A:$B for columns A and B.
 * 5) Click OK.

NOTE: You can click the Print area, Rows to repeat at top, or Columns to repeat at left boxes and then select cells in the worksheet to set the print area or row and column titles. You can also enter defined names in these boxes.

Set Print Area Button
By default, the Set Print Area toolbar button is not on the standard toolbar. However, you can add the Set Print Area button to any existing toolbar, or create a custom toolbar that contains this button. The Set Print Area toolbar button allows you to set the selected cells on your worksheet as the print area.

To add the Set Print Area toolbar button to an existing toolbar, follow these steps:
 * 1) On the View menu, point to Toolbars, and then ensure that the standard check box is selected.
 * 2) On the View menu, point to Toolbars, and then click Customize.
 * 3) In the Customize dialog box, click the Commands tab.
 * 4) On the Commands tab, under Categories, click File.
 * 5) In Commands list, select Set Print Area.
 * 6) Drag Set Print Area onto the standard toolbar.
 * 7) Click Close.

To set a print area using the Set Print Area toolbar button, select the range of cells on the worksheet that you want to set as the print area, and then click the Set Print Area toolbar button.

TIP: To clear a print area using the Set Print Area button, select the entire worksheet by clicking the select-all button (at the intersection of the row and column headings), or press CTRL+SHIFT+SPACEBAR, and then click the Set Print Area toolbar button.

Set Print Titles Dialog Box
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

To create and use a Microsoft Visual Basic procedure to display the Set Print Titles dialog box, follow these steps:  In Excel, press ALT+F11 to start the Visual Basic Editor. On the Insert menu, click Module.  Type the following code in the module sheet: Sub Set_Print_Titles Application.Dialogs(xlDialogSetPrintTitles).Show End Sub  Press ALT+F11 to return to Excel. On the Tools menu, point to Macro, and then click Macros. Click Set_Print_Titles, and then click Run.

The Set Print Titles dialog box appears.</li> Enter or select ranges in the Titles for columns box and/or the Titles for rows box, and then click OK.TIP: You can assign this procedure to a toolbar button for quick access.

For more information about assigning a macro to a toolbar button, click Microsoft Excel Help on the Help menu, type assign a macro to run from a keyboard shortcut, a graphic object, or a toolbar button in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

</li></ol>

Print Dialog Box Option to Print Selection
To print a selection of cells on a worksheet without setting a specific print area, follow these steps:
 * 1) Select the cells on the worksheet that you want to print.
 * 2) On the File menu, click Print.
 * 3) Under Print what, click Selection, and then click OK.

<div class="references_section">