Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Help! How do I insert a manual page break on a change in cell co

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert page break when there is a change in the row value [email protected] Excel Worksheet Functions 3 July 14th 06 07:20 PM
How do I show the manual page break? angels Excel Discussion (Misc queries) 1 February 9th 06 03:51 PM
Insert manual line break in formula 0-0 Wai Wai ^-^ Excel Worksheet Functions 3 December 11th 05 07:10 PM
Insert manual line break in formula 0-0 Wai Wai ^-^ Excel Worksheet Functions 1 September 8th 05 12:03 PM
Insert new row as cell contents change George Excel Discussion (Misc queries) 2 January 26th 05 11:47 AM


All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"