ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referential Copy and Past (https://www.excelbanter.com/excel-programming/357344-referential-copy-past.html)

Bob

Referential Copy and Past
 
I want to create a macro that copies from one set of cells and copies to the
end of the range without regard to the original size. Currently, all
variations copy over the last row of the previous copy, thus deleting one
line each time. if the Selection.End(xlDown).Select would index by one
each time it would react the way i need it to.

Range("A1:C4").Select
Selection.Copy
Selection.End(xlDown).Select
Range("A5").Select
ActiveSheet.Paste
End Sub




Range("A1:C4").Select
Selection.Copy
c Range("A5").Select
ActiveSheet.Paste
End Sub

Rob

Referential Copy and Past
 
you can use the offset method:

selection.end(xldown).offset(1,0).select



"Bob" wrote:

I want to create a macro that copies from one set of cells and copies to the
end of the range without regard to the original size. Currently, all
variations copy over the last row of the previous copy, thus deleting one
line each time. if the Selection.End(xlDown).Select would index by one
each time it would react the way i need it to.

Range("A1:C4").Select
Selection.Copy
Selection.End(xlDown).Select
Range("A5").Select
ActiveSheet.Paste
End Sub




Range("A1:C4").Select
Selection.Copy
c Range("A5").Select
ActiveSheet.Paste
End Sub


Toppers

Referential Copy and Past
 
Range("A1:C4").Copy Cells(Rows.Count, "A").End(xlUp)(2)

"Rob" wrote:

you can use the offset method:

selection.end(xldown).offset(1,0).select



"Bob" wrote:

I want to create a macro that copies from one set of cells and copies to the
end of the range without regard to the original size. Currently, all
variations copy over the last row of the previous copy, thus deleting one
line each time. if the Selection.End(xlDown).Select would index by one
each time it would react the way i need it to.

Range("A1:C4").Select
Selection.Copy
Selection.End(xlDown).Select
Range("A5").Select
ActiveSheet.Paste
End Sub




Range("A1:C4").Select
Selection.Copy
c Range("A5").Select
ActiveSheet.Paste
End Sub



All times are GMT +1. The time now is 02:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com