17 May 2012

Rows to Repeat

1. Excel having options for "Rows to Repeat at Top" - Press Alt + P + I, Select the Rows and OK.

2. There is no in-build function for "Rows to Repeat at Bottom", You can try below codes to show it in footer.
 Sub MyFooter()
    Dim StrFtr As String, Rng As Range, Sh As Worksheet, c As Range
    Set Sh = Worksheets("Sheet1")
    Set Rng = Sh.Range("A20:H20")
    For Each c In Rng
        StrFtr = StrFtr & c & " "
    Next c
    ActiveSheet.PageSetup.LeftFooter = StrFtr
End Sub

No comments:

Post a Comment