remove duplicates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have created an application that exports the name, address, postal code
from another program into excel. I need to remove duplicate records using
vba so the user doesnt have to remove duplicates manually. I have tried
using the Advanced Filter macro:

Range("B1:B10").AdvancedFilter xlFilterInPlace, unique:=True1"), Unique:=True

This code works fine if I know each time how many records there are, but as
my application is dynamic and the number of records is always changing this
code doesnt do exactly what I want it to. Any suggestions. Thanks.
 
set rng = Range(Range("B1"),Range("B1").End(xldown))
rng.AdvancedFilter xlFilterInPlace, Unique:=True
 
Back
Top