I'm trying to filter a worksheet in one workbook, then paste the results into another workbook. I've managed to get auto filter to work, but in researching the approach this morning, it seems that the advanced filter function is more appropriate. I'm really struggling to understand how to set the actual filters. Meaning, if I want to filter on column U for values of "Coded" AND on column F for values of "Chelsea"; I haven't been able to find any examples on the web that outline how to do that.
Code:
Sub AssignChelsea1LPLoans()
Application.ScreenUpdating = False
Dim flp As Workbook
Dim mws2, flpws2 As Worksheet
Dim flpPath, flpFName As String
Dim mLastRow2 As Long
ThisWorkbookName = ActiveWorkbook.Name
Set mws2 = ThisWorkbook.Sheets("Active_Inv")
mLastRow2 = Sheets("Active_Inv").Range("U" & Rows.Count).End(xlUp).Row
SortActiveInvSheet mws2, "S1", "F1"
If mws2.FilterMode Then
mws2.ShowAllData
Else
End If
Set flp = Workbooks.Open("[URL="file://\\crpjvffp00n2\BK"]File Location Here[/URL]")
Set flpws2 = ThisWorkbook.Sheets("Active_Inv")
mws2.Activate
Sheets("Active_Inv").Range("A1").CurrentRegion.AdvancedFilter _
Action:=xlFilterCopy, CriteriaRange:=flp.Sheets("Active_Inv").Range("A2"), Unique:=False
Application.ScreenUpdating = True
End Sub