macro and automatic page break
I need to insert a page break when 2 conditions are met.
I currently have:
Sub PageBreak()
Dim IngRow As Long
For IngRow = 2 To Cells(Rows.Count, "D").End(xlUp).Row + 1
If Range("D" & IngRow) < Range("D" & IngRow - 1) Then
ActiveSheet.HPageBreaks.Add Befo=Range("F" & IngRow)
End If
Next
End
But I also need consider if column F is greater than 0, insert page break
after row
--
yepidu
|