Categories
Microsoft Word

Remove Duplicate Entries

In this tutorial, we use wildcards to remove duplicate entries from a document. For example, duplicate paragraphs or duplicate words.

Regular expressions to the rescue again!

  • Click Home > Replace (or press Ctrl+H) to display the “Find and Replace” dialog box.
  • Click More>> button to expand the dialog box.
  • Clear any formatting (click No Formatting button)
  • Check the “Use wildcards” box.

Remove duplicate words

  • Enter (<*>) (\1) in the Find what box.
  • Enter \1 in the Replace with box.
  • Click the Replace All button.
Find and Replace dialog box

The \1 identifies a recurrence of the previous expression, in this case, any sequence of characters followed by a space. See How to use wildcards.

Remove duplicate paragraphs

  • Enter the (*^13)(\1)@ in the Find what box.
  • Enter \1 in the Replace with box.
  • Click the Replace All button.

The \1 identifies a recurrence of the previous expression, in 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. See How to use wildcards and How to Replace text.