View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How do I insert multiple page breaks simultaneously in Excel?

This macro will place a pagebreak at every change in name in column A.

Maybe that will work?

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


Gord Dibben MS Excel MVP

On Tue, 3 Oct 2006 13:41:02 -0700, Marina
wrote:

I just now figured out a different way to get to my goal. But I'd still like
to know how to insert multiple page breaks simultaneously. Yes, there is no
pattern because the spreadsheet has multiple people's names and each person
has a different number of rows of information, so I wanted each person's
information to go onto the next page. So, I was wondering if I could just
click on Ctrl and select the rows where the new person begins and then insert
page breaks for all of them simultaneously.