advancedfilter action

N

Nena

My goal is to autofilter the data in Column C Sheet 1 and have the
results placed in Column A Sheet 2 but it is not working, what am I
doing wrong?

Sheet1("C:C").AdvancedFilter
Action:=xlFilterCopy,Sheet1:=Range("C:C"),
CopyToRange:= Sheet2.Range(_"A6"),Unique:=True

Thanks in advance.
 
B

Bob Phillips

Untested

Sheet1("C:C").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Sheet2.Range("A6"), _
Unique:=True


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
N

Nena

Thanks, I'll give it a try.


Untested

Sheet1("C:C").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Sheet2.Range("A6"), _
Unique:=True

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)








- Show quoted text -
 
G

Guest

By Excel design you can apply the advanced filter on the same worksheet only.
The best option is set the target location somewhere on the same worksheet
and then copy the data from this location to Sheet2.

In short, your code will never execute if you try to apply advanced filter
with unique records on different worksheet.
 

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