ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I insert multiple page breaks simultaneously in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/112608-how-do-i-insert-multiple-page-breaks-simultaneously-excel.html)

marina

How do I insert multiple page breaks simultaneously in Excel?
 
I have a spreadsheet with multiple entries that have to be printed on
separate pages. I thought I could select the rows by clicking on the row and
Ctrl and then click on Insert Page Break - and boom, it will insert all 150
page breaks. Or do I really have to spend a whole hour doing this mindless
task manually? Please help.

ExcelBanter AI

Answer: How do I insert multiple page breaks simultaneously in Excel?
 
To insert multiple page breaks simultaneously in Excel, follow these steps:
  1. Open your Excel spreadsheet and go to the View tab in the ribbon.
  2. Click on Page Break Preview in the Workbook Views section.
  3. Your spreadsheet will now be displayed in a different view, with blue lines indicating where page breaks currently exist.
  4. To insert additional page breaks, simply click and drag the blue lines to where you want the new page breaks to be.
  5. You can also use the Insert Page Break button in the Page Setup section of the ribbon to add new page breaks.
  6. Once you have added all the necessary page breaks, you can exit Page Break Preview by clicking on Normal in the Workbook Views section of the ribbon.

Using Page Break Preview allows you to insert multiple page breaks at once, saving you time and effort.

Ron de Bruin

How do I insert multiple page breaks simultaneously in Excel?
 
Hi Marina

Maybe this macro will help ti insert a pagebreak every 20 rows (change to your number)

If row 1 is a header row and you want to print it on every page then
change RW + 1 to RW + 2 and use FilePage SetupSheet to fill in $1:$1
in the "Rows to repeat at top: " box.

This example will use row 1 till the last row with data in column A .

Sub Insert_PageBreaks()
Dim Lastrow As Long
Dim Row_Index As Long
Dim RW As Long

'How many rows do you want between each page break
RW = 20
With ActiveSheet
'Remove all PageBreaks
.ResetAllPageBreaks
'Search for the last row with data in Column A
Lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
For Row_Index = RW + 1 To Lastrow Step RW
.HPageBreaks.Add Befo=.Cells(Row_Index, 1)
Next
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Marina" wrote in message ...
I have a spreadsheet with multiple entries that have to be printed on
separate pages. I thought I could select the rows by clicking on the row and
Ctrl and then click on Insert Page Break - and boom, it will insert all 150
page breaks. Or do I really have to spend a whole hour doing this mindless
task manually? Please help.




marina

How do I insert multiple page breaks simultaneously in Excel?
 
Unfortunately, there is NO pattern as to how many rows come after each page
break. Is there still another way?


Dave Peterson

How do I insert multiple page breaks simultaneously in Excel?
 
If there's no pattern, how do you know where to put those pagebreaks when you do
it manually?

Maybe you have a keyword that indicates that a pagebreak goes above/below this
word???

If you have one, I bet Ron could modify that code to help you.

Marina wrote:

Unfortunately, there is NO pattern as to how many rows come after each page
break. Is there still another way?


--

Dave Peterson

Ron de Bruin

How do I insert multiple page breaks simultaneously in Excel?
 
If you have one, I bet Ron could modify that code to help you.

Sure



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Dave Peterson" wrote in message ...
If there's no pattern, how do you know where to put those pagebreaks when you do
it manually?

Maybe you have a keyword that indicates that a pagebreak goes above/below this
word???

If you have one, I bet Ron could modify that code to help you.

Marina wrote:

Unfortunately, there is NO pattern as to how many rows come after each page
break. Is there still another way?


--

Dave Peterson




marina

How do I insert multiple page breaks simultaneously in Excel?
 
I just now figured out a different way to get to my goal. But I'd still like
to know how to insert multiple page breaks simultaneously. Yes, there is no
pattern because the spreadsheet has multiple people's names and each person
has a different number of rows of information, so I wanted each person's
information to go onto the next page. So, I was wondering if I could just
click on Ctrl and select the rows where the new person begins and then insert
page breaks for all of them simultaneously.

Gord Dibben

How do I insert multiple page breaks simultaneously in Excel?
 
This macro will place a pagebreak at every change in name in column A.

Maybe that will work?

Sub InsertBreak_At_Change()
Dim i As Long
For i = Selection.Rows.Count To 1 Step -1
If Selection(i).Row = 1 Then Exit Sub
If Selection(i) < Selection(i - 1) And Not IsEmpty _
(Selection(i - 1)) Then
With Selection(i)
.PageBreak = xlPageBreakManual
End With
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 3 Oct 2006 13:41:02 -0700, Marina
wrote:

I just now figured out a different way to get to my goal. But I'd still like
to know how to insert multiple page breaks simultaneously. Yes, there is no
pattern because the spreadsheet has multiple people's names and each person
has a different number of rows of information, so I wanted each person's
information to go onto the next page. So, I was wondering if I could just
click on Ctrl and select the rows where the new person begins and then insert
page breaks for all of them simultaneously.




All times are GMT +1. The time now is 07:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com