Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Setting Print Ranges for Multiple Worksheets.

Setting Print Ranges for Multiple Worksheets

Written by Allen Wyatt (last updated June 24, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003


Martin asked if there is a way to set print ranges for multiple worksheets at the same time. He has a workbook containing a number of worksheets structured exactly the same, and he wants their respective print ranges to be exactly the same.

As Martin has discovered, there is no way to do this directly in Excel. When you select multiple worksheets, select the area you want set as the print area, and then try to set the print area, you quickly discover that the option to do the setting is grayed out, so you cannot select that option.

There are several things you can try, however. One is to start with a new workbook and develop a single worksheet that contains the print area as you would want it on all worksheets. Then, copy the worksheet however many times desired in the workbook. The copied worksheets will have the print area set as it was in the first worksheet.

The other option is to create a macro that will do the print-area setting for you. Consider the following macro, which will set the print area for all the selected worksheets to whatever the print area is on the active worksheet. (When more than one worksheet is selected, the active worksheet is the one that is visible when you run the macro.)

Sub SetPrintAreas1()
    Dim sPrintArea As String
    Dim wks As Worksheet

    sPrintArea = ActiveSheet.PageSetup.PrintArea
    For Each wks In ActiveWindow.SelectedSheets
        wks.PageSetup.PrintArea = sPrintArea
    Next
    Set wks = Nothing
End Sub

If you prefer to have the print area set to some range that you specify, rather than needing to set the print area on the active worksheet first, then you can make one small change to the macro so that it uses a range for the print area:

Sub SetPrintAreas2()
    Dim sPrintArea As String
    Dim wks As Worksheet

    sPrintArea = "A7:E22"
    For Each wks In ActiveWindow.SelectedSheets
        wks.PageSetup.PrintArea = sPrintArea
    Next
    Set wks = Nothing
End Sub

To choose a different print area for your needs, replace the range that is assigned to the sPrintArea variable. If you figure that you may use the macro quite a bit, in a number of different workbooks, or if you figure that you may need to change the print area regularly, you could change the macro so that it prompts the user for a range to use:

Sub SetPrintAreas3()
    Dim sPrintArea As String
    Dim wks As Worksheet

    sPrintArea = InputBox("Enter print area range")
    For Each wks In ActiveWindow.SelectedSheets
        wks.PageSetup.PrintArea = sPrintArea
    Next
    Set wks = Nothing
End Sub

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3157) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Setting Print Ranges for Multiple Worksheets.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Notation for Thousands and Millions

When working with very large numbers in a worksheet, you may want the numbers to appear in a shortened notation, with an ...

Discover More

ExcelTips: Times and Dates

Excel is great at storing all types of data, including times and dates. ExcelTips: Times and Dates provides the ...

Discover More

Using Seek In a Macro

When processing non-document text files in a macro, you have a wide range of commands available for your use. One of ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Specifying Print Quantity in a Cell

When you print a worksheet, you can specify in the Print dialog box how many copies you want printed. If you want the ...

Discover More

Changing Orientations within a Single Printout

Excel allows you to print out information in either portrait or landscape orientation, but what if you need both types of ...

Discover More

Out of Kilter Borders

Borders not printing properly? It could be any one of a number of reasons causing the problem. This tip provides some ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.