Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default remove duplicates

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.
--
quigleyj
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default remove duplicates

set rng = Range(Range("B1"),Range("B1").End(xldown))
rng.AdvancedFilter xlFilterInPlace, Unique:=True

--
Regards,
Tom Ogilvy


"jeff quigley" wrote in message
...
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.
--
quigleyj



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove duplicates Gazza Excel Discussion (Misc queries) 7 January 29th 10 04:33 PM
remove duplicates BlindShelter Excel Discussion (Misc queries) 2 December 19th 08 08:45 PM
Remove Duplicates dk New Users to Excel 15 March 28th 08 07:41 AM
How to remove duplicates? Lakewoodsale Excel Discussion (Misc queries) 2 January 25th 08 10:31 PM
Remove duplicates Tuttamay77 Excel Discussion (Misc queries) 4 May 12th 06 10:56 PM


All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"