LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Page 1 to Page 2

Problem Solved thanks to Gord.

"Stanley Braverman" wrote in message
...

I am having a problem with the splitting order. If I use 50 rows per
page
Then the split and sorting order is ok. But if I want 42 rows per
page or any other amount then
The splitting order is out of proper sort.

In other words:
Page 1 plus page 2 now equals page 1
Then after moving up cleared cells
Page 2 and page 3 now equals page 2 (formally page 3 and 4)
Then after moving up cleared cells
Page 3 and page 4 now equals page 3 (formally page 5 and
6)etc..etc.etc
What needs to be changed to accomadate the different page sizes.

Thanks


Sub Move_Sets_PBreak()
Dim iSource As Long
Dim iTarget As Long

ISource= 1
ITarget= 1
Do
Cells(iSource, "A").Resize(50, 5).Cut _
Destination:=Cells(iTarget, "A")
Cells(iSource + 50, "A").Resize(50, 5).Cut _
Destination:=Cells(iTarget, "f")
ISource= iSource + 100
ITarget= iTarget + 50
PageBreak = xlPageBreakManual
Loop Until IsEmpty(Cells(iSource, "A").Value)

End Sub







 
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
Format page number in excel footer to start at a specific page # straitctrydncr Excel Discussion (Misc queries) 4 April 28th 23 07:45 PM
How do I do page breaks when view menu doesnt page break preview HeatherF55 Excel Discussion (Misc queries) 0 September 21st 07 04:24 AM
save page ,clear page, reuse same page dave Excel Programming 1 June 6th 07 06:01 AM
change and/or remove page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:15 AM
excel fit to 1 page shows 1 page but not all data is on that page Jans Excel Programming 1 September 2nd 04 01:49 AM


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

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

About Us

"It's about Microsoft Excel"