Good Morning all.
I have a problem solving what I am sure is easy once you know the syntax but still being relatively new to VBA I don't. I am trying remove additional rows after a selection has been coped from one worksheet to another I have used the following code to do the copying and pasting and this works fine, now what I am trying to do is once the below code has run and is completed any addition empty rows at the bottom of the copied data will be removed. I have tried adding the line
Range(Selection, Selection.End(xlDown).Row + 1, 1).Select but get a compile error: Wrong number of arguments or invalid property assignment.
Any help/advice would be appreciated.
Thanks
Sandy
Sheets("January").Select
ActiveSheet.Range("$A$5:$CN$105").AutoFilter Field:=92, Criteria1:="<>"
Application.Goto Reference:="Jan"
Selection.Copy
Sheets("Annual Completed").Select
Cells(Range("A1").End(xlDown).Row + 1, 1).Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Range("$A$5:$CN$105").AutoFilter Field:=92
Range("A5").Select
Sheets("January").Select
ActiveSheet.Range("$A$5:$CN$105").AutoFilter Field:=92
Range("A6").Select
Bookmarks