markpem
06-03-2015, 06:34 AM
Hello
I have some working code (below) which filters column O in worksheet "Main Sheet" for the word "COMPLETED" and copies it, then jumps to the "Completed" Sheet and finds the last unused row and pastes it there.
What is the best (and cleanest) way to delete all the items i just copied over back on the main sheet?
Thanks for all your time and trouble
Sheets("Main Sheet").Activate
lastRow = Range("A" & Rows.Count).End(xlUp).Row
ActiveSheet.Range("$A$1:$AC$" & lastRow).AutoFilter Field:=15, Criteria1:= _
"COMPLETED"
Range("A2:AC" & lastRow).Select
Selection.Copy
Sheets("Completed).Select
lastrow2 = Range("A" & Rows.Count).End(xlUp).Row
Range("A" & lastrow2+1).Select
ActiveSheet.Paste
I have some working code (below) which filters column O in worksheet "Main Sheet" for the word "COMPLETED" and copies it, then jumps to the "Completed" Sheet and finds the last unused row and pastes it there.
What is the best (and cleanest) way to delete all the items i just copied over back on the main sheet?
Thanks for all your time and trouble
Sheets("Main Sheet").Activate
lastRow = Range("A" & Rows.Count).End(xlUp).Row
ActiveSheet.Range("$A$1:$AC$" & lastRow).AutoFilter Field:=15, Criteria1:= _
"COMPLETED"
Range("A2:AC" & lastRow).Select
Selection.Copy
Sheets("Completed).Select
lastrow2 = Range("A" & Rows.Count).End(xlUp).Row
Range("A" & lastrow2+1).Select
ActiveSheet.Paste