How to use macros to delete duplicate items in a list in Excel 2000 (240077)
The information in this article applies to:
This article was previously published under Q240077 For a Microsoft Excel 2002 version of this article,
see
291320. SUMMARY In Microsoft Excel, you can create a macro to delete
duplicate items in a list. You can also create a macro to compare two lists,
and delete items in the second list that are also in the first (master) list.
This is helpful if you want to merge two lists together, or if you only want to
see the new information.
This article includes sample Microsoft
Visual Basic for Applications macros (Sub procedures) that show how to delete duplicate records in a single
list (Sample 1), and how to delete duplicate records after comparing one list
against another (Sample 2). These macros do not require the list to be sorted.
Also, the macros delete any number of duplicates, regardless of whether an item
is duplicated once or several times in the list. REFERENCES For more information about how to use the sample code in
this article, click the article number below to view the article in the
Microsoft Knowledge Base: 212536
OFF2000: How to Run Sample Code from Knowledge Base Articles
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbAutomation kbProgramming kbdtacode kbhowto KB240077 |
---|
|