View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default how to automate page break

Sub Insert_PBreak_Col()
Dim rng As Range
Dim Cell As Range
Set rng = Intersect(ActiveSheet.UsedRange, Columns(4)) 'adjust to suit
For Each Cell In rng
If Cell.text = "Total" Then
Cell.Offset(1, 1).PageBreak = xlPageBreakManual

End If
Next

End Sub


Gord Dibben MS Excel MVP

On Thu, 17 Sep 2009 20:34:01 -0700, goodman
wrote:

I have a sheet for different customers name with total foe each.I want to
print every customer seperate by inserting a page break at the total line. I
did it before manualy
Is any way I can do it automaicaly or with a macro

Your help is greatly appreciated