View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2362_] Rick Rothstein \(MVP - VB\)[_2362_] is offline
external usenet poster
 
Posts: 1
Default Copy row to first empty row in new sheet

You didn't say what row you are copying, so I am assuming it is the row you
are on (the one with the active cell on the active worksheet) when you
activate the macro. You do, however, have to change my worksheet reference
from Sheet8 which I used in my code to whatever the actual worksheet name is
(make sure it is wrapped in quote marks like I show in my example) where you
are copying the information to.

Sub MoveCurrentRow()
With ActiveCell.EntireRow
.Copy Worksheets("Sheet8").Cells(Rows.Count, "A").End(xlUp).Offset(1)
.Clear
End With
End Sub

Also note that all I do is "clear" the data from the current row because you
said "clear the information". If instead of just erasing the data, you
actually wanted to delete the entire row (so that you wouldn't have blank
rows remaining on your current sheet where you activated the macro from),
then use this code instead...

Sub MoveCurrentRow()
With ActiveCell.EntireRow
.Copy Worksheets("Sheet8").Cells(Rows.Count, "A").End(xlUp).Offset(1)
.Delete
End With
End Sub

Rick


"Taylor" wrote in message
...
I would like to:

1. Copy a row of data
2. Paste it into the first empty row on another sheet
3. Return to the sheet where the data was originally entered
4. Clear the information previously entered in the aforementioned row

Forgive me, but I know little to nothing about VBA language, so an
easy-to-understand response is greatly appreciated!

Thanks in advance!