Page Break

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to do a page break at each new location...for example:

Location#
11028
11029

At the end of each location I want to do a page break.....How can I do this???
 
Hi pm,

Go to View>Page Break Preview
Click on a blue line and drag it to where you want it.
If you get a bit savage with it at first you will soon see how it works.
By savage I mean grab one line and drag it way off to the right
then grab another and drag it way down the bottom.

HTH
Martin
 
You OK with a macro?

Sub InsertBreak_At_Change()
Dim i As Long
For i = Columns(1).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
 
Gord - - works fabulously! Thanks so much>
pm

Gord Dibben said:
You OK with a macro?

Sub InsertBreak_At_Change()
Dim i As Long
For i = Columns(1).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
 
Back
Top