making a book and not sure what I need
MZ Tools makes life easier for the Excel VBA coder
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: making a book and not sure what I need

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Illinois
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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 ]

  2. #2
    Board Regular
    Join Date
    Aug 2003
    Location
    England
    Posts
    5,533
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: making a book and not sure what I need

    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
    -------------------------
    Hope this is helpful.
    -------------------------

    Have been away from the forum for quite a while, but am now back.

  3. #3
    MrExcel MVP tusharm's Avatar
    Join Date
    May 2002
    Posts
    11,007
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: making a book and not sure what I need

    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.
    Quote Originally Posted by onlyadrafter
    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}

  4. #4
    Board Regular
    Join Date
    Aug 2003
    Location
    England
    Posts
    5,533
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: making a book and not sure what I need

    Tursham

    Thank you, your comments have been noted, I will endeavour to do this in the future.
    -------------------------
    Hope this is helpful.
    -------------------------

    Have been away from the forum for quite a while, but am now back.

  5. #5
    New Member
    Join Date
    Mar 2002
    Location
    Illinois
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    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.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com