Macro to copy a row and paste

Closed
Report
-
Posts
697
Registration date
Thursday May 14, 2009
Status
Member
Last seen
November 24, 2010
-
Hello,
I am having difficulty writing a macro for the following example. From a dropdown i select a tag, when i click the ok button the sheet is to copy the row of the coordinating tag and paste it on the current sheet in the next available row. For example sheet 2 row 1 column A would have #1 and when the #1 is selected from the dropdown and you click ok the sheet should copy row 1 sheet 2 and paste it in the next available row in the current sheet (sheet1)
THANKS!

1 reply

Posts
697
Registration date
Thursday May 14, 2009
Status
Member
Last seen
November 24, 2010
218
Hello here is a little script:

Sub test()
Sheet2.Rows(1).Copy
Sheet1.Activate
Rows(1).Select
ActiveSheet.Paste
End Sub

it will copy row 1 on sheet 2 an past it in rows1 on sheet 1

if you need to found out the next free row, just loop until rows(x).value = null where x it the index of the row to be checked