View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Smith[_17_] John Smith[_17_] is offline
external usenet poster
 
Posts: 39
Default Advance Filter Format

Hi,
I'm passing a value from a combo box to the criteria range for an
advanced filter. The problem is when I run the filter I'm not getting
the unique values. If I pass Charlie Brown and run the filter, I get
all the records associated with Charlie Brown, but I also get Charlie
Brown1, Charlie Brown2, etc. What's the proper VBA syntax to make this
work? Thanks.
James

Sub Find_It()
Sheets("Smmary").Range("A1:AP53441").AdvancedFilte r Action:= _
xlFilterCopy, CriteriaRange:=Range("A1:AP2"),
CopyToRange:=Range( _
"A3:AP53443"), Unique:=True
End Sub