Hello all. I have a macro that am using to help generate inventory count sheets from a master sheet. I would also like to be able to use this to reprint 2nd count sheets from the same data set. The code I am using works perfect for generating the first count sheets. What I would like to be able to do is after data entry and filtering out the items that do not need recounts, rerun this code to reinsert page breaks but skipping the hidden rows. Any help would be awesome.

Sub formatSheets()
Dim i As Integer
 
 ActiveSheet.ResetAllPageBreaks
 
For i = 15 To 5000 Step 15
    ActiveSheet.HPageBreaks.Add Before:=Cells(i + 1, 1)
Next
End Sub