I have one sourace sheet and many target sheets. The process is
For each target sheet- apply a specific filter in source sheet and copy paste the data in target sheet. It was working fine, But after applying filter source sheet is empty than it is showing all the data in target sheet instead of blank.
Sub AG()
Range("A1:FG62").AutoFilter Field:=10, Criteria1:="X"
Sheets("A").Range("CN2:CN62").Copy Destination:=Sheets("B").Range("C2")
Sheets("A").Range("Q2:Q62").Copy Destination:=Sheets("B").Range("D2")
Sheets("A").Range("Q2:Q62").Copy Destination:=Sheets("B").Range("E2")
End Sub
If after applying filter there is any data in source file than it shows correctly only filtered data in target sheet. But if source file is empty after applying filter it shows complete data in target sheet.