Excel VB Script to Fill Values Based on Common Values in an Adjacent Cell

Robert 1 Reputation point
2021-11-01T18:44:38.577+00:00

I am looking for a VB script that will:

  1. Add the word "Duplicate" in column J for all records (except the first instance) where the corresponding value in column B is duplicated.
  2. If there is a value in column I for any one of the [duplicate] instances of column B, than copy that I value into column I for all instances.
  3. If any instances of the value in column B has a different I value, then highlight the cells in column I for all instances.

See the attached example. Thanks for your help.

145564-example.png

Microsoft 365 and Office | Development | Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.