Hi I need a macro that will insert a page break when the value in column A changes I have a list of around 95 numbers with approx 78 rows of data for each number though this will vary, there is a macro in there that used to work but longer does this macro was
Sub PageBreak()
Dim RNG As Range
Dim CurrNM As String
CurrNM = Range("A1").Value
For Each RNG In Range("A1", Range("A65536").End(xlUp))
If Not (CurrNM = RNG.Value Or RNG = "") Then
CurrNM = RNG.Value
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=RNG
End If
Next RNG
End Sub
any help would be greatly appreciated this is a report I have to run daily and is currently taking a ream of paper a day![]()
Bookmarks