+ Reply to Thread
Results 1 to 5 of 5

Inserting Page Breaks on relative Rows based on Data

Hybrid View

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Ah, page breaks:
    Sub x()
        Dim cell    As Excel.Range
    
        ActiveSheet.ResetAllPageBreaks
        For Each cell In Range("C3", Range("C3").End(xlDown))
            If cell.Value <> cell.Offset(-1).Value Then
                ActiveSheet.HPageBreaks.Add before:=cell
            End If
        Next cell
    End Sub
    Entia non sunt multiplicanda sine necessitate

  2. #2
    Registered User
    Join Date
    07-02-2008
    Location
    Fort Worth, TX
    Posts
    99
    OMG your just awesome!

+ 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