![how to delete duplicate documents in word how to delete duplicate documents in word](https://www.techspot.com/articles-info/0/images/2018-06-22-image-7.png)
The second list is on Sheet2 in the range A1:A100. The first list is on Sheet1 in the range A1:A10. The 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. Sample 2: Compare two lists and delete duplicate items ' Increment counter to account for deleted row. Sheets("Sheet1").Cells(iCtr, 1).Delete xlShiftUp If ActiveCell.Value = Sheets("Sheet1").Cells(iCtr, 1).Value Then If ActiveCell.Row Sheets("Sheet1").Cells(iCtr, 1).Row Then ' To specify a different column, change 1 to the column number. IListCount = Sheets("Sheet1").Range("A1:A100").Rows.Count ' Get count of records to search through. ' Turn off screen updating to speed up macro. 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.
![how to delete duplicate documents in word how to delete duplicate documents in word](https://i.ytimg.com/vi/iC1jktL1eL8/maxresdefault.jpg)
This macro requires that you do not have empty cells in the list range. The following sample macro searches a single list in the range A1:A100 and deletes all duplicate items in the list. Sample 1: Delete duplicate items in a single list
![how to delete duplicate documents in word how to delete duplicate documents in word](https://elementalenergysolutions.net/images/how-to-delete-duplicate-emails-word-document-2.png)
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. 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. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. Microsoft provides programming examples for illustration only, without warranty either expressed or implied.