Error filtering for unique values

C

C. Corodan

I have the following code:

Range("D10").Select
Range("D10:D9999").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range( _
"D11111"), Unique:=True

The list of unique values always has a duplicate item at the beginning, fo
rexample:

A-Customer
A-Customer
B-Customer
C-Customer
D-Customer
Not assigned

Any idea what is the error?
 
P

Per Jessen

Hi

The filter function see the first cell as a heading.

Expand your range to : D9:D999. Just notice that it will copy the filtered
range including the heading to the desired place.

Hopes it helps.

Best regards,
Per
 
C

C. Corodan

Thanks, you are right!

Per Jessen said:
Hi

The filter function see the first cell as a heading.

Expand your range to : D9:D999. Just notice that it will copy the filtered
range including the heading to the desired place.

Hopes it helps.

Best regards,
Per
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top