christian2016
Board Regular
- Joined
- Oct 6, 2016
- Messages
- 123
Hi Guys,
I have a range of data.
I need help writing a VBA code to see if the code column matches more than one name then if it does to only change the value of that code to the ext code.
So in this case it will only change Data 2 and data 3 as they both have the same Code numbers.
Any help is greatly appreciated. Tried to do it myself although can't figure it out.
Thanks
Example below before and after.
I have a range of data.
I need help writing a VBA code to see if the code column matches more than one name then if it does to only change the value of that code to the ext code.
So in this case it will only change Data 2 and data 3 as they both have the same Code numbers.
Any help is greatly appreciated. Tried to do it myself although can't figure it out.
Thanks
Example below before and after.
Code:
Existing Data
Code Name Ext Code
7216 Data1 7216 - 410
7216 Data1 7216 - 410
7216 Data1 7216 - 410
7216 Data1 7216 - 410
7216 Data2 7216 - 521
7216 Data1 7216 - 410
7216 Data2 7216 - 521
7216 Data3 7216 - 610
7216 Data1 7216 - 410
7156 Data1 7156 - 111
7156 Data1 7156 - 111
After Executing VBA Code
Code Name Ext Code
7216 Data1 7216 - 410
7216 Data1 7216 - 410
7216 Data1 7216 - 410
7216 Data1 7216 - 410
[B]7216 - 521 Data2 7216 - 521[/B]
7216 Data1 7216 - 410
[B]7216 - 521 [/B] [B] Data2 7216 - 521[/B]
[B]7216 - 610 Data3 7216 - 610[/B]
7216 Data1 7216 - 410
7156 Data1 7156 - 111
7156 Data1 7156 - 111