PC Review


Reply
Thread Tools Rate Thread

How can I insert data into my spreadsheet without the page breaks.

 
 
J D
Guest
Posts: n/a
 
      13th Aug 2008
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 With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      13th Aug 2008
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 Before:=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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Breaks for entire spreadsheet Dave_in_NoHo Microsoft Excel Setup 1 25th Jul 2008 06:48 AM
Page Breaks for entire spreadsheet Dave_in_NoHo Microsoft Excel Misc 1 10th Jul 2008 12:58 AM
setting page breaks for whole spreadsheet to be consistent? =?Utf-8?B?TWlja2V5?= Microsoft Excel Setup 1 15th May 2007 12:50 AM
How to copy page breaks within an Excel spreadsheet? =?Utf-8?B?V2FycmVu?= Microsoft Excel Misc 1 6th Apr 2006 07:54 PM
How to add page breaks to embedded spreadsheet =?Utf-8?B?TGF3cmVuY2U=?= Microsoft Excel Worksheet Functions 0 18th Jan 2005 02:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:45 PM.