Printing Problems

Change the Print Area on Multiple Excel Worksheets

Adam DavisAdam Davis Nov 18, 2026 872 views

Question details

Update the print area across similarly formatted Excel worksheets without setting it separately on each sheet.

Change the Print Area on Multiple Excel Worksheets
Product
Microsoft Excel
Device & OS
not provided
Scenario
A workbook contains multiple worksheets that should use the same cell range for printing.
Observed behavior
The user wants all worksheets to use the print area defined on the first worksheet.
Before you start

Confirm that the worksheets use the same cell layout and that the first worksheet is the one with the desired print area. Use a desktop version of Excel that supports VBA; Excel for the web cannot run VBA macros.

Solution 1Recommended

Copy the first worksheet's print area with a VBA macro

Use this method to apply the same print range to every other worksheet in the workbook.

1
Set the source print area

On the first worksheet, select the cells to print, then choose Page Layout > Print Area > Set Print Area.

2
Open the VBA editor

Open the VBA editor from Developer > Visual Basic. If the Developer tab is not visible, enable it through Excel's ribbon settings.

3
Insert a module

In the VBA editor, select the target workbook in the Project pane, then choose Insert > Module.

4
Add and run the macro

Paste the following code into the module, place the cursor inside the macro, and choose Run > Run Sub/UserForm: Sub CopyPrintArea() Dim printRange As String Dim i As Long printRange = ThisWorkbook.Worksheets(1).PageSetup.PrintArea If printRange = "" Then MsgBox "Set a print area on the first worksheet first." Exit Sub End If For i = 2 To ThisWorkbook.Worksheets.Count ThisWorkbook.Worksheets(i).PageSetup.PrintArea = printRange Next i End Sub

5
Check and save

Open File > Print and preview a few worksheets to confirm the correct cells are included. To keep the macro, use File > Save As and select Excel Macro-Enabled Workbook (*.xlsm).

Copy the first worksheet's print area with a VBA macro
Existing print areas are replaced: The macro overwrites the print area on every worksheet after the first. Run macros only in workbooks you trust, and follow your organization's macro security policies.
Free Microsoft Office alternative

Work with Excel worksheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and work with worksheets and print settings while transitioning from Microsoft Office.

Adjust worksheet print areas and preview pages before printingCompatible with Microsoft Excel formats such as .xlsx and .xlsFamiliar spreadsheet interface for an easier transition from ExcelFree and lightweight for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Will the macro change the first worksheet's print area?

No. It reads the first worksheet's existing print area and assigns it to each subsequent worksheet.

What happens if the first worksheet has no print area?

The macro displays a message and stops. Select the desired cells on the first worksheet and choose Page Layout > Print Area > Set Print Area before running it again.

Can I run this VBA macro in Excel for the web?

No. Open the workbook in a desktop version of Excel that supports VBA, then use Developer > Visual Basic to add and run the macro.

Will the macro preserve existing print areas on the other worksheets?

No. It replaces each subsequent worksheet's print area with the range from the first worksheet.

How do I keep the macro in the workbook?

In Excel, choose File > Save As and select Excel Macro-Enabled Workbook (*.xlsm).