How to Set Same Print Area to Multiple worksheets

This post will guide you how to set the same print area to multiple worksheets at the same time in excel. How to quickly set same print area in multiple worksheet using Excel VBA macro.

Set Print Area in a worksheet

If you want to set the print area in a worksheet, you can refer to the following steps:

1# select the range of cells that you want to set as the print area in your worksheet.

2# Go to PAGE LAYOUT Tab, click Print Area command under Page Setup group, then click Set Print Area.

set print area1

3# the selected cells should be added into the print area. You can click print preview to check it.

4# if you want to add cells to the existing print area, you just need to select the cells that you want to add, then click “Page Layout”->  “Print Area”-> “Add Print Area”.

set print area2

5# if you want to remove exist print area, you can click Clear Print Area from the drop-down list of Print Area.

Set Same Print Area to Multiple worksheets using excel macro

Assuming that you have a workbook with 20 worksheets and you want to set the same print area in each worksheet. In general, we just can set the print area for only one worksheet, how to set print area for multiple worksheets in excel? This post will teach you how to write a new excel macro to set print are in multiple worksheets.

If you want to set same print area for all the worksheets in an active workbook, you can use the following excel macro.

Sub SetPrintAreaAllWorksheets()
    Dim w As Worksheet
    Dim R As Range
    Set R = Application.Selection
    For Each W In Application.ActiveWorkbook.Worksheets
        W.PageSetup.PrintArea = R.Address
    Next
End Sub

 

If you just want to set same print area for the selected worksheets in an active workbook, you can use the following excel macro.

Sub SetPrintAreaSelectedWS()
    Dim w As Worksheet
    Dim R As Range
    Set R = Application.Selection
    For Each W In Application.ActiveWorkbook.SelectedSheets
        W.PageSetup.PrintArea = R.Address
    Next
End Sub

 Related Posts

Comments

So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Sidebar