Find specific values out of duplicates


I have data in A:A. This data may contain duplicates. In B:B I have a list with data that will definitely be in A:A.

What I want my code to do is run through my list in B:B individually from top to bottom, and find that exact value in A:A. As soon as it finds a value that is exactly the same it should highlight it and go to the next row in B:B to look for the new value I want to find in A:A. I don’t want it to find all the values that is the same and highlight it. Just One for One.

Example: List A:A —-> apple, lemon, lemon, lime, lemon, apple, pear. List B:B —> lemon, lime, lemon.

Running through B:B it should highlight just one ‘lemon’ in A:A. Then to the next cell’s value and it should highlight ‘lime’. Then the last value in B:B that should be searched is another ‘Lemon’ — It should now highlight only the second ‘lemon’ in A:A, and leave the last lemon un-highlighted.

By: Dewald

Leave a Reply

Your email address will not be published. Required fields are marked *