#1   Report Post  
Sheri
 
Posts: n/a
Default 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   Report Post  
Ron de Bruin
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page scaling & Page break preview prob Martin ©¿©¬ @REMOVETHIS.plus.com Excel Discussion (Misc queries) 1 July 17th 05 09:10 PM
Can't delete a page break Suhail Excel Discussion (Misc queries) 4 July 7th 05 06:49 PM
page break preview VickiJo Excel Discussion (Misc queries) 1 June 10th 05 04:12 PM
adding a new page break to an existing page break Edward Letendre Excel Discussion (Misc queries) 1 March 6th 05 09:29 AM
content does not stay in page break notexcellent Excel Worksheet Functions 1 February 13th 05 05:55 AM


All times are GMT +1. The time now is 09:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"