Sunday, August 6, 2023

Repeat excel rows at bottom

 Sub MyFooter()

Dim xTxt As String

Dim xAddress As String

Dim xRg As Range

Dim xCell As Range

On Error Resume Next

xAddress = ActiveWindow.RangeSelection.Address

Set xRg  = Application.InputBox("Select the row you will insert repeatedly at the bottom:", "Kutools for Excel", xAddress, , , , , 8)

If xRg Is Nothing Then Exit Sub

For Each xCell In xRg

xTxt = xTxt & xCell.Value & " "

Next

ActiveSheet.PageSetup.LeftFooter = xTxt

End Sub

No comments:

Post a Comment

How to get Ranking of the Students in Excel using RANK Function

=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...