Sub SetPrintArea() ' Declarations Dim lastCell As Range Dim i As Integer ' Code for i = 1 to ActiveWorkbook.Sheets.Count With ActiveWorkbook.Sheets(i) Set lastCell = Cells.SpecialCells(xlCellTypeLastCell) sht.PageSetup.PrintArea = Range(Cells(1, 2), lastCell).Address Set lastCell = Nothing End With next i