Filtering Excel Data with VBA

mosslovell

New Member
Joined
Oct 5, 2014
Messages
4
Hi All,

I have been searching the internet to solve my little problem.

I have some data and I would like to filter in place unique data to show unique values only.

I dont want to copy the data to another sheet as i will be using the filtered data to filter it down some more.

So for example

NameLastPlace
AnnAWolves
AnnbBham
BettyaWolves
CarolaBham
CarolbWolves
AnnAWolves
CarolaBham

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>
So I need to filter on Wolves and show only the unique names.

Thanks in advance guys.

Moss
 

=ODIN=

Active Member
Joined
Dec 3, 2009
Messages
288
If you research advanced filters, I think those will manage what you are looking for. In your example though, you would have to enter "Place" and "Wolves" into 2 cells of your sheet first, then use that for the criteria range argument of the advanced filter. I would try out the advanced filter through the Ribbon GUI first to see how it works before messing with the VBA.
 

mosslovell

New Member
Joined
Oct 5, 2014
Messages
4
If you research advanced filters, I think those will manage what you are looking for. In your example though, you would have to enter "Place" and "Wolves" into 2 cells of your sheet first, then use that for the criteria range argument of the advanced filter. I would try out the advanced filter through the Ribbon GUI first to see how it works before messing with the VBA.
Thanks for your reply Odin.

I think you have misunderstood me.

When you do an advanced filter you can have the results displayed on the same page(inplace) which only shows the results or have the results copied to another sheet.

I have tried mixing normal filter and advanced filter but some object error shows.

The data also has other columns, which I guess play a part in the rows being unique or not.

So i need to filter data based on the selection then show only the unique values where the values to use are in the first 3 columns only.

Cheers all that have the knowledge.

Moss
 

Forum statistics

Threads
1,084,799
Messages
5,379,946
Members
401,633
Latest member
DinnerB0ne

Some videos you may like

This Week's Hot Topics

Top