Hello, everyone,
I want to copy column A:M from row 11 to the last row of sheet name 2000 to sheet named Data from A11.
Then I want to copy column A:M from row 11 to the last row of sheet name 2001 to sheet named Data from the last empty row.
In other words, I want to add these sheets named 2000 and 2001 and paste to sheet named Data.
The following code is my try but it does not work.
I appreciate your help.
DL
I want to copy column A:M from row 11 to the last row of sheet name 2000 to sheet named Data from A11.
Then I want to copy column A:M from row 11 to the last row of sheet name 2001 to sheet named Data from the last empty row.
In other words, I want to add these sheets named 2000 and 2001 and paste to sheet named Data.
The following code is my try but it does not work.
I appreciate your help.
DL
Code:
varWSnames = Array("2000", "2001")
For Each ws In varWSnames
ws.Activate
LR = ws.Cells(Rows.Count, 1).End(xlUp).Row
Range("A11:M" & LR).Select
With Selection
Selection.Copy
Sheets("Data").Select
Range("A11").Select
ActiveSheet.Paste
End With
Next ws