Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() If I sort spreedshet on Column A, I want to print a paper report that starts a new page whenever the contents of col. A changes. How? TIA. -- Al Dykes News is something someone wants to suppress, everything else is advertising. - Lord Northcliffe, publisher of the Daily Mail |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Right click your sheet tab, view code and paste this in and run it Sub marine() lastrow = Cells(Rows.Count, "A").End(xlUp).Row Set myrange = Range("A2:A" & lastrow) For Each c In myrange c.Select If c.Value < c.Offset(-1, 0).Value Then ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCell End If Next End Sub Mike "Al Dykes" wrote: If I sort spreedshet on Column A, I want to print a paper report that starts a new page whenever the contents of col. A changes. How? TIA. -- Al Dykes News is something someone wants to suppress, everything else is advertising. - Lord Northcliffe, publisher of the Daily Mail |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub Insert_PBreak()
Dim OldVal As String Dim rng As Range OldVal = Range("A1") For Each rng In Range("A1:A300") '<< change range If rng.text < OldVal Then rng.PageBreak = xlPageBreakManual OldVal = rng.text End If Next rng End Sub Gord Dibben MS Excel MVP On 23 Jul 2008 14:31:08 -0400, (Al Dykes) wrote: If I sort spreedshet on Column A, I want to print a paper report that starts a new page whenever the contents of col. A changes. How? TIA. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
insert page break when there is a change in the row value | Excel Worksheet Functions | |||
How do I show the manual page break? | Excel Discussion (Misc queries) | |||
Insert manual line break in formula | Excel Worksheet Functions | |||
Insert manual line break in formula | Excel Worksheet Functions | |||
Insert new row as cell contents change | Excel Discussion (Misc queries) |