View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default how to insertnew worksheet page

Sub Insert_PBreak()
Dim OldVal As String
Dim rng As Range
OldVal = Range("A1")
For Each rng In Range("A1:A3000")
If rng.text < OldVal Then
rng.PageBreak = xlPageBreakManual
OldVal = rng.text
End If
Next rng
End Sub

Note............with 3000 cells to look at, will take a while because
pagebreak insertion is a slow process.


Gord Dibben MS Excel MVP

On Mon, 25 Aug 2008 13:04:02 -0700, nellellen
wrote:

I have a 4 column worksheet sorted by column A (product name). there are
3000 records in the worksheet. I need to create a page break based on a
change of the value in Collumn A. The ultimate destination of the results
will be insertion into a word document with a page break between each
separate "table".

any assistance onhow to achieve the above is greatly appreciated. My skill
level in excel is moderate beginner...

thank you - Ellen