Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Page Break
I need Excel to insert a page break at every blank row. The number of rows
per page will be different each time I run the report, so the row number will change each time. I have been inserting the page breaks manually, but it is a very time consuming process with such a long report. -- Sheri |
#2
|
|||
|
|||
Hi Sheri
Try this tester I check all blanks in A1:A20 Sub Insert_PageBreaks() Dim cell As Range ActiveSheet.ResetAllPageBreaks On Error Resume Next For Each cell In Range("A1:A20").SpecialCells(xlCellTypeBlanks) ActiveSheet.HPageBreaks.Add Befo=Cells(cell.Row, 1) Next On Error GoTo 0 End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Sheri" wrote in message ... I need Excel to insert a page break at every blank row. The number of rows per page will be different each time I run the report, so the row number will change each time. I have been inserting the page breaks manually, but it is a very time consuming process with such a long report. -- Sheri |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page scaling & Page break preview prob | Excel Discussion (Misc queries) | |||
Can't delete a page break | Excel Discussion (Misc queries) | |||
page break preview | Excel Discussion (Misc queries) | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) | |||
content does not stay in page break | Excel Worksheet Functions |