Hello everybody
I am trying to apply advanced filter but I got an error .. missing field ..
Sub FilterData()
Dim LastRow As Long
LastRow = Sheets("Sheet2").Cells(Rows.Count, 4).End(xlUp).Row
Sheets("Sheet3").Range("G5:N1000").ClearContents
Sheets("Sheet2").Range("D4:L" & LastRow).AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Sheets("Sheet3").Range("P1:S2"), CopyToRange:=Sheets("Sheet3").Range("G5:N5"), Unique:=True
End Sub
How can I filter data without using this method as this method depends on criteria table which is P1:S2 in sheet3?
Thanks for help
Bookmarks