ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unique Filter Code / Advanced Filter (https://www.excelbanter.com/excel-programming/419308-unique-filter-code-advanced-filter.html)

Fester[_2_]

Unique Filter Code / Advanced Filter
 
I have a database of information. I want to remove all duplicate
entries for each patient. For some reason, the advanced filter -
uniques only, still shows duplicate names. I've checked with =A2=B2
and it comes back True.

Any suggestions on how to fix or is there VBA code that will give me
the same result?

Brendon

Peo Sjoblom[_2_]

Unique Filter Code / Advanced Filter
 
Does your table that you are using in the advanced filter only have one
column?

If not you need to look at the whole table. If you for instance have


Names Numbers
Mr X 1
Mr X 2
Mr Y 3
Mr Z 4

and use that table and select unique records only, then all those entries
are unique.

Is that what you did?

If it is you need to use a criteria range

Use a 2 cell criteria, assume the names start in A4 with the header so the
data starts in A5 and that H1:H2 is the criteria range, leave H1 blank in H2
put

=COUNTIF($A$5:A5,A5)=1


select the table, do datafilteradvanced filter, DON'T select
unique records, put $H$1:$H$2 in the criteria range and select copy
to another location

That will give you this list


Names Numbers
Mr X 1
Mr Y 3
Mr Z 4






--


Regards,


Peo Sjoblom

"Fester" wrote in message
...
I have a database of information. I want to remove all duplicate
entries for each patient. For some reason, the advanced filter -
uniques only, still shows duplicate names. I've checked with =A2=B2
and it comes back True.

Any suggestions on how to fix or is there VBA code that will give me
the same result?

Brendon





All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com