Hi,
Try this:
Sub InsertBreaks()
Dim myRange As Range
For Each myRange In Range([A2], [A65536].End(xlUp))
If myRange.Value <> myRange.Offset(1, 0).Value Then
ActiveSheet.HPageBreaks.Add before:=myRange.Offset(1, 0)
End If
Next myRange
End Sub
Dom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.