Happy Friday!
I am in need of assistance with a problem I am having.
I am trying to come up with a code that will allow be to copy a set of rows and paste them in a column on a continuous loop.
Currently I have the code :
Sub TerminalReserve()
Dim TermReserve As Range
Dim Cell As Range
Dim DurationAddress As String
Dim PlanName As String
Dim IssueAge As String
Dim Duration As String
Dim Factor As String
Dim x As Integer
Dim PlanNameAddress As String
Dim rowdum As Variant
Dim counter As Integer
Dim ReserveName As String
Dim IssueNameAddress As String
Dim IssuingAge As String
Dim FactorAddress As String
Dim y As Integer
'HardCoding of PlanName and Issue Age
ReserveName = "20000001"
IssuingAge = "10"
'Creating Table Header
PlanName = "PlanName"
Range("G1").Value = PlanName
IssueAge = "IssueAge"
Range("H1").Value = IssueAge
Duration = "Duration"
Range("I1").Value = Duration
Factor = "Factor"
Range("J1").Value = Factor
'Creating Duration, IssueAge, & PlanName Inputs
x = 1
While x < 101
PlanNameAddress = "G" + VBA.Trim(Str(x + 1))
IssueNameAddress = "H" + VBA.Trim(Str(x + 1))
DurationAddress = "I" + VBA.Trim(Str(x + 1))
Range(DurationAddress).Value = x
x = x + 1
Range(PlanNameAddress).Value = ReserveName
Range(IssueNameAddress).Value = IssuingAge
Wend
'Selects TermReserve
Set TermReserve = Range("A1:E869")
TermReserve.Select
'Inputs for Factor Table
Range("A3:E3").Copy
Range("J2").PasteSpecial Transpose:=True
Range("A4:E4").Copy
Range("J7").PasteSpecial Transpose:=True
End Sub
If you look at 'Inputs for Factor Table, I want to be able to do exactly that but on a loop so I don't have to keep coding each specific row.
I want the loop to stop once it reaches Row 23 which starts a new cycle.
TerminalReserveMacro.xlsm
Thank for your responses and help!!!
Bookmarks