Datetag example.xlsm
How to find the first name then add a pagebreak on top of it, then the next... doing that for all other names.
Example on the first sheet and desired outcome on the 2nd sheet.
Datetag example.xlsm
How to find the first name then add a pagebreak on top of it, then the next... doing that for all other names.
Example on the first sheet and desired outcome on the 2nd sheet.
Try:
![]()
Sub AddPageBreak() Application.ScreenUpdating = False Dim bottomA As Integer bottomA = Sheets("Example").Range("A" & Rows.Count).End(xlUp).Row Dim rng As Range For Each rng In Range("A4:A" & bottomA) If rng = "Company:" Then Range("A" & rng.Row).Select Sheets("Example").HPageBreaks.Add Before:=ActiveCell End If Next rng Application.ScreenUpdating = True End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks