Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 09-02-2021, 07:55 PM
Guessed's Avatar
Guessed Guessed is offline Help with a script to find Duplicate data in the same row of a table or tables Windows 10 Help with a script to find Duplicate data in the same row of a table or tables Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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
 

Tags
duplicate in tables, help please, highlight cells



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help to Script to align all the tables only as of a section to end of doc? Cendrinne Word VBA 4 04-05-2021 11:37 AM
Can Excel find Duplicate entries when only part of the cell's data is a duplicate of another cell? jsisley Excel 1 07-21-2017 09:20 AM
Help with a script to find Duplicate data in the same row of a table or tables VBA Table – Search All Tables - Find & Replace Text in Table Cell With Specific Background Color jc491 Word VBA 8 09-30-2015 06:10 AM
Script starts nesting tables without reason selman555 Word VBA 1 10-17-2014 01:01 AM
Pivot Table Duplicate Data cnw Excel 0 08-31-2012 08:24 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:54 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft