PDA

View Full Version : Solved: Move Row(s) to Another Worksheet



Anne Troy
02-02-2006, 01:04 PM
Would love a button on my worksheet that'll move the selected row(s) to the bottom of another sheet.

Specs:
Original worksheet name: ThisWeek
Send to worksheet name: Sent

Would be great if I don't have to select entire rows, but as long as any cell is selected in a row, it'll move the entire row.

This would also make a great KB entry called "Move Row(s) to Another Worksheet".

:hi:

Jacob Hilderbrand
02-02-2006, 01:34 PM
Try this.


Option Explicit

Sub MoveRows()

Dim Row As Long

Row = Sheets("Sent").Range("A65536").End(xlUp).Row + 1
Selection.EntireRow.Copy Destination:=Sheets("Sent").Range("A" & Row)
Selection.EntireRow.ClearContents
'Selection.EntireRow.Delete

End Sub


I am not sure if you want to delete the selected rows or just clear the contents, so you have both options.

Anne Troy
02-02-2006, 02:12 PM
That does it. Works excellent. Thanks!!
(This is actually for my own personal use!)

Jacob Hilderbrand
02-02-2006, 07:07 PM
Glad to help :beerchug:

Take Care