+ Reply to Thread
Results 1 to 2 of 2

Page Break-every blank row

  1. #1
    Sheri
    Guest

    Page Break-every blank row

    I need Excel to insert a page break at every blank row. The number of rows
    per page will be different each time I run the report, so the row number will
    change each time. I have been inserting the page breaks manually, but it is
    a very time consuming process with such a long report.
    --
    Sheri

  2. #2
    Ron de Bruin
    Guest

    re: Page Break-every blank row

    Hi Sheri

    Try this tester
    I check all blanks in A1:A20

    Sub Insert_PageBreaks()
    Dim cell As Range
    ActiveSheet.ResetAllPageBreaks
    On Error Resume Next
    For Each cell In Range("A1:A20").SpecialCells(xlCellTypeBlanks)
    ActiveSheet.HPageBreaks.Add Before:=Cells(cell.Row, 1)
    Next
    On Error GoTo 0
    End Sub


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Sheri" <[email protected]> wrote in message news:[email protected]...
    >I need Excel to insert a page break at every blank row. The number of rows
    > per page will be different each time I run the report, so the row number will
    > change each time. I have been inserting the page breaks manually, but it is
    > a very time consuming process with such a long report.
    > --
    > Sheri




+ 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