Hi
Today my question is "Is it possible to create a dynamic CopyToRange in advance filter in VBA like I have two macros here
Sub Macro1()
Range("DG10:DQ10").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("DG10").Select
Range("A7:K1048576").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
Range("Journal!DH4:DH5"), CopyToRange:=Range("DG9:DQ9"), Unique:=False
End Sub
Here is the other one which I want to edite
Sub Macro2()
Range("A7:K1048576").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _
Range("DI4:DI5"), CopyToRange:=Range(some range), Unique:=False
End Sub
Now required is that the result of Macro2 should be pasted to the last empty row of the result of Macro1
How can I change the line of code of Macro 2 (the bold line) to get the required results?
Your help will be much appreciated as I am stuck with this situation.
Best Regards
Imran Bhatti
Bookmarks