View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
J Sedoff comRemove> J Sedoff comRemove> is offline
external usenet poster
 
Posts: 42
Default Using .Row help please

This should work. It finds the last occupied cell in Column A, copies that
row and the row above it, then pastes it directly under the last occupied row.

Range("A65536").End(xlUp).Select
ActiveCell.Offset(-1, 0).Select
Rows(ActiveCell.Row & ":" & ActiveCell.Offset(1, 0).Row).Copy
ActiveCell.Offset(2, 0).Select
Rows(ActiveCell.Row & ":" & ActiveCell.Offset(1, 0).Row).Select
ActiveSheet.Paste
Application.CutCopyMode = False

Hope this helps, Jim
--
I appreciate any feedback.