View Single Post
 
Old 07-15-2022, 03:05 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

They seeem right but you need also to change the last line:
If mydic.Count > 0 Then ActiveSheet.AutoFilter.Range.AutoFilter Field:=5, Criteria1:=mydic.keys, Operator:=7

If still it doesn't work, try manually removing the autofilter before running the macro. You should only need to do this once (if it finds an autofilter in place it leaves it).
Reply With Quote