VBA to set AutoFilter to List all rows with same values in column?

D

Dennis

XL 2003

If I had data in column B like:

Col A Col B Col C
R1 xx 1 vt
R2 qq 3 er
R3 tt 2 lk
R4 ll 1 ha
R5 cv 2 ne
R6 ws 1 xw

I would like the live data "filtered" to display like:
R1 xx 1 vt
R4 ll 1 ha
R6 ws 1 xw
R3 tt 2 lk
R5 cv 2 ne



R2 qq 3 er Does not display because listed only once



Thus 1) sorted by value in Col B
2) Any "B" value with more than one item in the list

What is the smartest way to do this and be able to use it again and again.
(That is why I thought of VBA)

Thanks for any efforts.

I am hoping that someone may have this tool already designed and is willing
to share it?

Dennis
 
D

Dave Peterson

I'd just use a helper column of formulas:

=countif($b$2:$B$1000,b2)
and drag down
(adjust the range to match)

Then filter to show greater than 1
 
D

Dennis

Great idea Dave.

Thanks!



Dave Peterson said:
I'd just use a helper column of formulas:

=countif($b$2:$B$1000,b2)
and drag down
(adjust the range to match)

Then filter to show greater than 1
 

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