View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Question on Macros

I think you mean the first empty row? Either put the data in LastRow or
NewRow.

with Sheets("Sheet3")
LastRow = .Range("n" & Row.Count).end(xlup).row
NewRow = LastRow + 1
Sheets("sheet1").Range("l51:l" & Trim(Str(20 + iRows))).Copy
.Range("n2:n" & NewRow).PasteSpecial
Paste:=xlPasteValues

"Juan Carlos" wrote:

I have a macro that is moving data from on sheet to another.

For example the macro below will move everything that is in l51down to n2.

Sheets("sheet1").Range("l51:l" & Trim(Str(20 + iRows))).Copy
Sheets("sheet3").Range("n2:n" & Trim(Str(3 + iRows))).PasteSpecial
Paste:=xlPasteValues

How can I move more data to sheet 3 that will automatically put the data in
the last row where the previous data was placed?

Thanks