Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Have a list of books checked out to students. Need a page break at each
change in name. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Assuming names are in column A. Adjust to suit.
Sub InsertBreak_At_Change() 'Sandy Mann July 1st, 2007 Dim LastRow As Long Dim X As Long LastRow = Cells(Rows.Count, 1).End(xlUp).Row Application.ScreenUpdating = False For X = LastRow To 2 Step -1 If Cells(X, 1).Value < Cells(X - 1, 1).Value Then If Cells(X, 1).Value < "" Then If Cells(X - 1, 1).Value < "" Then Cells(X, 1).PageBreak = xlPageBreakManual End If End If End If Next X Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Wed, 12 May 2010 16:15:01 -0700, LStewart wrote: Have a list of books checked out to students. Need a page break at each change in name. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() "Gord Dibben" wrote: Assuming names are in column A. Adjust to suit. Sub InsertBreak_At_Change() 'Sandy Mann July 1st, 2007 Dim LastRow As Long Dim X As Long LastRow = Cells(Rows.Count, 1).End(xlUp).Row Application.ScreenUpdating = False For X = LastRow To 2 Step -1 If Cells(X, 1).Value < Cells(X - 1, 1).Value Then If Cells(X, 1).Value < "" Then If Cells(X - 1, 1).Value < "" Then Cells(X, 1).PageBreak = xlPageBreakManual End If End If End If Next X Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Wed, 12 May 2010 16:15:01 -0700, LStewart wrote: Have a list of books checked out to students. Need a page break at each change in name. . This worked wonderfully!! Thank you so much! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Good to hear
Thanks for the feedback On Fri, 14 May 2010 15:01:01 -0700, LStewart wrote: "Gord Dibben" wrote: Assuming names are in column A. Adjust to suit. Sub InsertBreak_At_Change() 'Sandy Mann July 1st, 2007 Dim LastRow As Long Dim X As Long LastRow = Cells(Rows.Count, 1).End(xlUp).Row Application.ScreenUpdating = False For X = LastRow To 2 Step -1 If Cells(X, 1).Value < Cells(X - 1, 1).Value Then If Cells(X, 1).Value < "" Then If Cells(X - 1, 1).Value < "" Then Cells(X, 1).PageBreak = xlPageBreakManual End If End If End If Next X Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Wed, 12 May 2010 16:15:01 -0700, LStewart wrote: Have a list of books checked out to students. Need a page break at each change in name. . This worked wonderfully!! Thank you so much! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
When automatic page breaks are moved each cell becomes a new page | Excel Discussion (Misc queries) | |||
Inserting page breaks | Excel Worksheet Functions | |||
Inserting Page Breaks | Excel Discussion (Misc queries) | |||
Automatic page breaks | Excel Discussion (Misc queries) | |||
Inserting Page Breaks | Excel Discussion (Misc queries) |