Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Automatically insert page break every 6 rows in excel doc
I have a very large excel document and I need to insert a page break, say
after a fixed number of rows eg 6 rows. To insert page break manually it will take hours. Can anybody help ? |
#2
|
|||
|
|||
Try this:
Sub insert_page_breaks() For r = 7 To 100 Step 6 Worksheets("Sheet1").Rows(r).PageBreak = xlPageBreakManual Next End Sub -- Ian -- "Icetea" wrote in message ... I have a very large excel document and I need to insert a page break, say after a fixed number of rows eg 6 rows. To insert page break manually it will take hours. Can anybody help ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert rows based on specific value | Excel Worksheet Functions | |||
Insert a number of rows based on a value in a cell on active row | Excel Discussion (Misc queries) | |||
Page Break | Excel Worksheet Functions | |||
Repeating Rows and Columns on each page of print out | Excel Discussion (Misc queries) | |||
Protect Worksheet but allow to insert or delete rows | Excel Discussion (Misc queries) |