Article ID: 291320 - View products that this article applies to.
This article was previously published under Q291320
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Sample 1: Delete duplicate items in a single listThe following sample macro searches a single list in the range A1:A100 and deletes all duplicate items in the list. This macro requires that you do not have empty cells in the list range. If your list does contain empty cells, sort the data in ascending order so that the empty cells are all at the end of your list.
Sample 2: Compare two lists and delete duplicate itemsThe following sample macro compares one (master) list against another list, and deletes duplicate items in the second list that are also in the master list. The first list is on Sheet1 in the range A1:A10. The second list is on Sheet2 in the range A1:A100. To use the macro, select either sheet, and then run the macro.
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:
(http://support.microsoft.com/kb/290140/EN-US/ )How to run sample code from Knowledge Base articles
Article ID: 291320 - Last Review: September 18, 2011 - Revision: 6.0
Contact us for more help