• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Cant get Contains Named Range in Filter to work

ashfire

New Member
as above. named range works fine as equals etc but cant get it to work for Contains


named range is strfilterstring


any help greatly appreciated. cheers


ActiveSheet.ListObjects("Table__1124_Defects_By_TeamLeader___Test_Path_Dates"). _

Range.AutoFilter Field:=4, Criteria1:="=*strfilterstring*", Operator:= _

xlAnd
 
Ashfire


Have a go at the following

Range.AutoFilter Field:=4, Criteria1:="=*" & strfilterstring & "*", Operator:= xlAnd


I think because you have the strfilterstring inside the " " it will not get seen

Let us knwo how you go
 
Hui it works a treat, you are a god. thank you very much indeed.


this will save so much time now. We have teamleaders that cover multiple areas and cover multiple systems and they cross over frequently so there isnt an easy logic to it. However with the above code we can now show them which defects are theirs and which could be theirs. Brilliant!


thanks again
 
Back
Top