Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
page break automatic macro
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. 883 456789 john wayne 2.25 25.00 883 123456 john wayne 1.75 22.50 ------------------------------------------------- *** 47.50 -------------------------------------------------- 887 789123 Steven Segal 3.45 34.50 887 345678 Steven Segal 4.45 44.50 I would like to see the line when column "A" changes, but after space and after total. -- yepidu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatic page break | Excel Discussion (Misc queries) | |||
macro and automatic page break | Excel Discussion (Misc queries) | |||
Excel-page break automatic | Excel Discussion (Misc queries) | |||
Cannot move an automatic page break | Excel Discussion (Misc queries) | |||
Automatic page break | Excel Programming |