Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
J D J D is offline
external usenet poster
 
Posts: 1
Default How can I insert data into my spreadsheet without the page breaks.

I have a large spreadsheet that includes various lists of people who work in
different areas. I set it up to print with page breaks in between each group.
The problem is when I add or delete people from the lists. When I insert or
delete names and shift cells up or down, the page breaks shift also. Then I
have to go back in and change all the page breaks. Is there a way to lock
page breaks?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How can I insert data into my spreadsheet without the page breaks.

Can you try to insert page breaks, dynamically, after the data in the page
changes? Try the macro below, but make a backup first, just in case the
results are not what you want.

Sub pagebreak()
Dim value1 As String
Dim value2 As String

Range("A2").Select
Do While ActiveCell.Value < ""
value1 = ActiveCell.Value
ActiveCell.Offset(1, 0).Select
value2 = ActiveCell.Value
If value1 < value2 Then
ActiveCell.EntireRow.Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCell
Else
End If
Loop
End Sub


Regards,
Ryan---

--
RyGuy


"J D" wrote:

I have a large spreadsheet that includes various lists of people who work in
different areas. I set it up to print with page breaks in between each group.
The problem is when I add or delete people from the lists. When I insert or
delete names and shift cells up or down, the page breaks shift also. Then I
have to go back in and change all the page breaks. Is there a way to lock
page breaks?

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
How do I insert multiple page breaks simultaneously in Excel? marina Excel Discussion (Misc queries) 7 April 4th 23 10:48 AM
Excel: how to insert page breaks between all the rows at once? Kim Excel Discussion (Misc queries) 1 June 25th 08 09:37 PM
How do I insert page breaks in a huge EXCEL file? Robert Judge Excel Discussion (Misc queries) 4 February 18th 08 04:51 PM
How do I insert page breaks in .txt for use in excel? JohnK Excel Discussion (Misc queries) 2 January 19th 07 11:24 PM
Insert Multiple Page Breaks heater Excel Worksheet Functions 1 September 13th 06 10:35 PM


All times are GMT +1. The time now is 04:24 PM.

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"