View Single Post
 
Old 09-02-2021, 07:55 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Perhaps you haven't explained what you wanted the code to do.

The original compared the Words in the first column with the contents of the second cell. I changed it so it compares the Words in the first column with the contents of the rest of the row. It isn't comparing every word in every row to see if there is a duplicate somewhere.

Also, your sample code is predominantly numbers and the code is treating a number like 84,222,076 as five separate words (84 , 222 , 076). It then decides whether any of those five 'words' appear on the rest of the row.

If your requirements are for any repeats, anywhere in a row then a different methodology would work. Take a look at the macro I just did on another thread. That process could be adapted to work on numbers in a row instead of sentences in a document. https://www.msofficeforums.com/word/...sentenses.html
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote