L
les
I am looking for code to do the following.
I want to insert a new line at the end of (Range_1). I then want to take a
record from (Range_2) and paste value that in the line I just inserted.
I am trying to set this up as a repeatative process.
The code that I am using just copys the range and paste it at the end of the
last record. This is almost what I want but not exact.
Dim RngToCopy As Range
Dim NextCell As Range
With Worksheets("Database")
Set NextCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
End With
With Worksheets("Database")
Set RngToCopy = .Range("NewRecord")
End With
RngToCopy.Copy _
Destination:=NextCell
End Sub
Thanks!
I want to insert a new line at the end of (Range_1). I then want to take a
record from (Range_2) and paste value that in the line I just inserted.
I am trying to set this up as a repeatative process.
The code that I am using just copys the range and paste it at the end of the
last record. This is almost what I want but not exact.
Dim RngToCopy As Range
Dim NextCell As Range
With Worksheets("Database")
Set NextCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
End With
With Worksheets("Database")
Set RngToCopy = .Range("NewRecord")
End With
RngToCopy.Copy _
Destination:=NextCell
End Sub
Thanks!