View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Question about AdvancedFilter

Advanced filter expects the first row in the range to be the header.

Maybe you can use E1:E5000

or add headers, then include that row, too.

Paul B wrote:

Set FilterRange = Range("E2:E5000")

FilterRange.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("J2"),
Unique:=True

I put data like this in column E, down to row 100, row 1 has the header
"Number"

Number

1

2

3

1

2

3

But when I run the code I get, why am I getting 2 number 1's ???

1

2

3

1


--

Dave Peterson