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
You can choose to have Page Breaks when doing Data/Subtotal for a list. It will also generate a couple of summary rows as well below the data, which may be useful.
Cheers, Glenn.
Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
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.