#1
|
|||
|
|||
Removing a duplicate words
hi,
i need a macro for removing a immediate duplicate words in a documents. example : Input: Title: Title: please use a meaningful and specific title to describe your question. Output: Title: please use a meaningful and specific title to describe your question. In the above case green colored "title" is removed only if there is following or immediate same words. If there is no same word it remains constant as seen in red colored word "title" and it has not to be changed in anywhere. like title word is presented three times in a doc but only removed only at one place. please do the needful ... |
#2
|
||||
|
||||
You don't need a macro for this. It can all be done via a wildcard Find/Replace.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
hi
thanks for replying.. but in a document am having more than 100 strings and manually checking and replacing will take more time, if it is possible through single click it will be more helpful to me. |
#4
|
||||
|
||||
A single wildcard Find/Replace can clean up all duplicated words (as well as duplicated multi-word strings) in a document. For example:
Find = (<*>?@)\1 Replace = \1
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Hi,
Its working great but when the repeated text was at the end of the line, it was not get replaced, can you please modify the find & replace text, it will be more helpful to me. Ex: Input: financial income income Output: financial income Input: unit: INR Output: unit: INR Input : gain from sales Output : gain from sales Input : income From gain gain Output : income From gain |
#6
|
|||
|
|||
Hi,
Could you please review the above one, is there any change in the FIND String to get replace with this conditions... Input: financial income income Input: interest income Input : gain from sales Input : income income From gain gain Output: financial income Output: interest income Output: gain from sales Output: income From gain Only starting line items were get replaced, if there is any same double line items at the end it will not get replaced. Find = (<*>?@)\1 Replace = \1 With the above command only highlighted bold one get replaced even though we are having repeated words at the end of the line. Please check and do the needful... |
#7
|
||||
|
||||
What happens if you change the find what to search for
(<*>) \1 Note there is a space in front of the \1
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#8
|
|||
|
|||
Thank you for your response to my quiery. I appreciate the information you have provided me with, and I appreciate your prompt reply.
|
Tags |
removing duplicates |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Removing duplicate cross-reference entries in an index | Rajesoz | Word | 4 | 05-18-2018 03:48 PM |
Removing duplicate rows when identical value in a column | ballpoint | Excel | 1 | 01-05-2018 08:54 AM |
Removing Duplicate Text in a Document | rsrasc | Word VBA | 11 | 10-26-2014 02:02 PM |
Locating and removing large, duplicate blocks of copy in word | markaffleck | Word | 2 | 06-05-2014 10:12 PM |
Removing duplicate index entries | Bengt | Word | 5 | 03-01-2013 02:01 AM |