making a book and not sure what I need

edsjr

New Member
Joined
Mar 27, 2002
Messages
33
Hello.......

I have about 30,000 rows with 4 columns to each row. I need to make another "set" next to the first........in otherwords I need to make rows 1-15 and 16-30 on the same page with 31-45 and 46-60 on the next page.

Is there an easy way to do this?

Thanks
Ed.
This message was edited by edsjr on 2002-04-15 05:38
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hello,

I know you posted this a long time ago, but I have only recently registered, and am trying to work my way through the unanswered posts, to gain as much experience as possible. I don't know if you need this any more, but I think I have come up with a solution.

This code assumed columns A:D are used and the move is to columns F:I,
if not you only have to play about with the numbers.

Sub Macro14()
Range("A1:D15").Select
Do Until ActiveCell = ""
For LAST = 15 To 70000 Step 15
Selection.Offset(LAST, 0).Select
If ActiveCell = "" Then
ADD_PAGEBREAKS
End If
Selection.Cut
Selection.Offset(-15, 6).Select
ActiveSheet.Paste
Range("A1:D15").Select
Selection.Offset(LAST, 0).Select
Selection.Delete Shift:=xlUp
Range("A1:D15").Select
Next LAST
Loop
End Sub

Sub ADD_PAGEBREAKS()
Range("a16").Select
Do Until ActiveCell = ""
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Selection.Offset(15, 0).Select
Loop
End
End Sub
 
Upvote 0
That is going back quite a while!

A suggestion when posting code. After you paste the code in the textbox in the form used for posting, select the code and click the 'Code' button just above the textbox. That formats the code for readability.
onlyadrafter said:
Hello,

I know you posted this a long time ago, but I have only recently registered, and am trying to work my way through the unanswered posts, to gain as much experience as possible. {anip}
Sub Macro14()
Range("A1:D15").Select
Do Until ActiveCell = ""
For LAST = 15 To 70000 Step 15
Selection.Offset(LAST, 0).Select
If ActiveCell = "" Then
ADD_PAGEBREAKS
End If
{snip}
 
Upvote 0
Tursham

Thank you, your comments have been noted, I will endeavour to do this in the future.
 
Upvote 0
I havent been here for a while, but since you answered a couple years after I posted.....I might as well reply a couple years after that!

I ended up using asap utilities to get the job done, it did a great job and I had it done in just a few minutes.

Ed.
 
Upvote 0

Forum statistics

Threads
1,214,426
Messages
6,119,411
Members
448,894
Latest member
spenstar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top