Macro to copy a row and paste

Closed
Dustin0479 - Sep 3, 2009 at 01:16 PM
sadgurl Posts 697 Registration date Thursday May 14, 2009 Status Member Last seen November 24, 2010 - Sep 3, 2009 at 01:51 PM
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!
Related:

1 response

sadgurl Posts 697 Registration date Thursday May 14, 2009 Status Member Last seen November 24, 2010 219
Sep 3, 2009 at 01:51 PM
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
0