Hello All,

Hoping someone can help me with the correct syntax/method to use, in order to pass an AutoFilter criteria (of either =Unassigned, or <>Unassigned) to a Function, and then the function uses the passed-in value to apply it to the AutoFilter command (see code below).

In spite of trying a number of different things/ways, I still cannot figure it out.

Thanks.

Sub something()
   ...
   ...
   ...


   Call UpdateBusUnitDivAndSubDiv("""<>Unassigned""", "do not use business unit text", "business group text", "business unit text")

   ...
   ...
   ...
End Sub

'-------------------------------------------------------------------------

Function UpdateBusUnitDivAndSubDiv(filterCriteria As String, filterColName As String, copyValuesColName As String, updateValuesColName As String)
   ...
   ...
   ...

   '--- Now filtering for "unassigned" on the column
        ActiveSheet.UsedRange.AutoFilter field:=ColNumber1, Criteria1:=filterCriteria

   ...
   ...
   ...

End Function