ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro Help - Copy Selected Row (https://www.excelbanter.com/excel-discussion-misc-queries/162624-macro-help-copy-selected-row.html)

Teddy-B

Macro Help - Copy Selected Row
 
Help_ I need to write a macro that will copy any single row that is
highlighted and paste it to a designated row on a different worksheet
Ex.~(Row50). I am reassembling a form based upon archived data in the row
being copied.

Please help!
~Thanks

Gary''s Student

Macro Help - Copy Selected Row
 
Sub TeddyB()
Selection.Copy Sheets("Sheet2").Range("A50")
End Sub

assuming you have select the entire row, it is a one-liner.
--
Gary''s Student - gsnu200750


"Teddy-B" wrote:

Help_ I need to write a macro that will copy any single row that is
highlighted and paste it to a designated row on a different worksheet
Ex.~(Row50). I am reassembling a form based upon archived data in the row
being copied.

Please help!
~Thanks


JW[_2_]

Macro Help - Copy Selected Row
 
Sub foo()
Selection.EntireRow.Copy _
Destination:=Sheets("Sheet2").Rows(50)
End Sub

Teddy-B wrote:
Help_ I need to write a macro that will copy any single row that is
highlighted and paste it to a designated row on a different worksheet
Ex.~(Row50). I am reassembling a form based upon archived data in the row
being copied.

Please help!
~Thanks



Dave Peterson

Macro Help - Copy Selected Row
 
One more...

Activecell.entirerow.copy _
destination:=worksheets("OtherSheetNameHere").rang e("A50")

Selection could be more than one row.

Teddy-B wrote:

Help_ I need to write a macro that will copy any single row that is
highlighted and paste it to a designated row on a different worksheet
Ex.~(Row50). I am reassembling a form based upon archived data in the row
being copied.

Please help!
~Thanks


--

Dave Peterson


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

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