[Previous] [Contents] [Next]

Remove Duplicate Entries from a List


The Problem:

So far, so goodthe membership list is now in the format "Membershipnumber Tab Lastname, Firstname," and I've sorted it into ascending order using Table Sort. But I can already see a ton of duplicate entries that I'll need to knock out.

The Solution:

Regular expressions to the rescue again! Choose Edit Replace to display the Find and Replace dialog box. Next, clear any formatting and check the "Use wildcards" box. Enter (*^13)(\1)@ in the "Find what" box and \1 in the "Replace with" box. Click the Replace All button. The \1 identifies a recurrence of the previous expressionin this case, any sequence of characters followed by a carriage return (represented by the code ^13). The @ makes Word find one or more occurrences of the repeated item. So the expression (*^13)(\1)@ finds a paragraph that is repeated by itself one or more times, and the replacement \1 replaces what is found (the repeated paragraph or paragraphs) with the paragraph itself.


[Previous] [Contents] [Next]