Thread: Page breaks
View Single Post
  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

Paul

I like this.

So very much much faster than the clunk I posted.

Thanks, Gord

On Fri, 28 Jan 2005 12:43:58 -0500, "Paul B"
wrote:

Rob, try this

Sub InsertBreaks()
Set rng = Range(Cells(2, 1), _
Cells(Rows.Count, 1).End(xlUp))
For Each cell In rng
If Trim(cell.Value) < _
Trim(cell.Offset(-1, 0).Value) Then
ActiveSheet.HPageBreaks.Add cell
End If
Next
End Sub