Hi,
I've created the below macro that uses the advanced filter to filter and copy two sets of data from different sheets into one sheet. However the second set of data pastes over the first because the CopyToRange is the same. How can I change the CopyToRange of the 'Detailed Reg' to be the next empty row?
Sheets("Test").Range("A20:S1048576").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Test").Range("Q17:Q18"), CopyToRange:=Range("A1:S1") _
, Unique:=False
Sheets("Detailed Reg").Range("A2:S1048576").AdvancedFilter Action:= _
xlFilterCopy, CriteriaRange:=Sheets("Test").Range("P14:P15"), CopyToRange:= _
Range("A1:S1"), Unique:=False
Thanks
Bookmarks