View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
[email protected] chiendh@uci.edu is offline
external usenet poster
 
Posts: 7
Default VBA: AdvancedFilter - Unique Copy of column of names doesn't work?!

On Mar 6, 5:40 pm, "merjet" wrote:
Nope. I've got a NAMES header on the column in the actual (huge)
spreadsheet I'm writing. It's some sort of odd bug/behaviour in
Excel....


Debra's intuition was correct. The Names header isn't being included
in the range to filter, so Excel takes the first instance of Alcantara-
Hernandez to be a header.


So how do I adjust the line:
Worksheets("NAMES").Range("A2:A500").AdvancedFilte r
Action:=xlFilterCopy, CopyToRange:=Worksheets("NAMES").Range("C2"),
Unique:=True

to reflect this? (assume that the data is in A2 through A500, the
header at A1)

If I used ...Range ("A1:A500")... it doesn't even do this correctly -
accidentally copies the header into the list.
If I leave it as is, it duplicates Alcantara-Hernandez.

Is there some other trick for putting the column header besides it's
current row 1 position in the column of names?

Thanks!