I need the VBA to take the values from column A in the "Final_Sheet" and filter by those values in column A of the "SIS_Case_Contacts" sheet.
Sub filter()
Dim lastRowSISCaseContacts As Long
Dim lastRowFinalSheet As Long
Dim ws As Worksheet
Set ws = Sheets("SIS_Case_Contacts")
With Sheets("SIS_Case_Contacts")
lastRowSISCaseContacts = .Range("A" & .Rows.Count).End(xlUp).Row
End With
With Sheets("Final_Sheet")
lastRowFinalSheet = .Range("A" & .Rows.Count).End(xlUp).Row
End With
ws.Range("A2:A" & lastRowSISCaseContacts).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Sheets("Final_Sheet").Range("A2:A" & lastRowFinalSheet), Unique:=False
End Sub
This gives me a Run-time error '1004': Advancedfilter method of Range class failed.