Thread: macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default macro

Sub MoveIt()
Dim srcRng As Range
Dim destRng As Range
Set srcRng = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).EntireRow
Set destRng = Worksheets("Sheet2").Cells(Rows.Count,
"A").End(xlUp).Offset(1, 0)
srcRng.Copy destRng
End Sub

Warning: fails if column A in either Sheet1 or Sheet2 is empty

HTH
--
AP

"antonov" a écrit dans le message de
.. .
hello, I would like to know if it is possible to create a macro to select
the LAST WRITTEN row of a worksheet and then paste it at the end of

another
sheet
thanks for any help