VBA for Excel 2007 using an Advanced Filter

FuzzyTom

New Member
Joined
May 26, 2011
Messages
24
Hi,

I have a range say A1:A100 that is populated with Client Names.

I would like to use Advance Filter to copy unique values of Client Names to another Range ... say G1 and in another case H1.

This is the criteria I have been testing for a while with no success:

in Range B2, my criteria range, I have:

="=*-ccs"

My thinking being that I would like all unique entries in A1:A100 that have "-ccs" as part of the Client name copied to G1

Then for my second case my criteria range, C2, is:

="<>*.ccs"

Again, I was hoping for all Client Names that do not have "-ccs" as part of the Client Name copied to H1.

I was thinking when I get this to work I would record the whole operation and thereby see the VBA code necessary to achieve the result.

Well, I cannot even get this to work ... typically that means I need to get more knowledge and being smart I know exactly where to go for this knowledge.

Any pointers, suggestions or help you can offer will be appreciated.

Thanks.
Tom.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Here are the criteria i used for the advanced filter

Excel 2010
DEFGH
1NameNameName
2jane-ccs is not good*-ccs*<>*-ccs*
3kahjdsadskadsljsdalksda
4adsjkadsksadkjsad -ccsNameName
5dsahssdajkdsjkdsjakjane-ccs is not goodkahjdsadskadsljsdalksda
6dsajdsjkadssdjsdasakadsjkadsksadkjsad -ccsdsahssdajkdsjkdsjak
7-ccs is ntotootot-ccs is ntotoototdsajdsjkadssdjsdasak
8this is not incredibkethis is not incredibke
Sheet5
 
Upvote 0
Wow ... that was quick.

Thanks @Momentman ... do I setup my criteria range as you have it in Column G and H?

Tom
 
Upvote 0
Yes, the criteria ranges are G1-G2 for those that contain "-ccs" and H1:H2 for those that dont contain "-ccs"

The results are what you see from cell G4 in column G and H4 in column H
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,113
Members
452,544
Latest member
aush

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top