Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2007

Tip: Looking for answers? Try searching our database.

Page Break each Row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ripper - 07 Dec 2007 16:32 GMT
Is there a way to force Excel to put a page break after every row that
contains something (anything) is the A column of that row.  I don't need
Excel to put breaks on all the rows, just the ones that have information.

Excel 2002
Signature

Thanks As Always
Rip

Gord Dibben - 07 Dec 2007 17:52 GMT
Select column A then run this macro.

Sub InsertBreak()
Dim i As Long
   For i = Columns(1).Rows.Count To 1 Step -1
       If Selection(i).Row = 1 Then Exit Sub
       If Not IsEmpty(Selection(i - 1)) Then
           With Selection(i)
               .PageBreak = xlPageBreakManual
           End With
       End If
   Next
End Sub

Note:  will take a while depending upon your used range in Column A

Gord Dibben  MS Excel MVP

>Is there a way to force Excel to put a page break after every row that
>contains something (anything) is the A column of that row.  I don't need
>Excel to put breaks on all the rows, just the ones that have information.
>
>Excel 2002

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.