+ Reply to Thread
Results 1 to 4 of 4

Macro that does page break after Nth row

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Macro that does page break after Nth row

    What I have thus far: We get a bunch of data that ranges anywhere from 100 lines to 30000 lines and it has to be included in the report. I created a macro that will cut my data at the 110th row and separate it into four columns so that basically 440 lines of data can be read on one page. On the ones that have 30000 lines of data, manually page breaking it can be a pain.

    I need a macro that will do a page break on the first page at 115, and then 110 rows after that. I also need it to extend to column S or rather have the print area set to where there's data in it.

    Please help!!
    Last edited by gabster786; 12-12-2012 at 05:06 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro that does page break after Nth row

    Try something like this...

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-11-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro that does page break after Nth row

    That worked! I have to manually change the first page and the vertical page break but it puts everything else where it's supposed to be so I'm good with that! thanks!!

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro that does page break after Nth row

    Quote Originally Posted by gabster786 View Post
    That worked! I have to manually change the first page and the vertical page break but it puts everything else where it's supposed to be so I'm good with that! thanks!!
    You're welcome.

    You could record your "manual" steps and add the recorded macro code above the line ActiveSheet.ResetAllPageBreaks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1