Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how to insertnew worksheet page

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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


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
Page numbers on copies of a single page worksheet sr accountant Excel Discussion (Misc queries) 1 May 7th 07 06:29 PM
change cell size from page to page on the same worksheet Danny Excel Worksheet Functions 2 December 15th 05 06:20 PM
Converting a muliple page worksheet to a single page worksheet [email protected] Excel Discussion (Misc queries) 2 June 30th 05 09:40 PM
Page 1, Page 2, ...is showing up very large in the worksheet. Nick Excel Discussion (Misc queries) 0 March 21st 05 12:25 PM
why would page 1 of an excel worksheet print smaller of page 2 if. hisdrama pest Excel Discussion (Misc queries) 1 January 10th 05 07:14 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"