Hi guys,
New to this forum as I have a problem I can't solve. I have a worksheet comprising a single column that has data in it comprising codes separated by commas. The codes might be repeated and need to be replaced if they repeat with the number of times they repeat.
Below is a potential entry:
aa,bb,aa,cc,dd,aa
I need to replace this entry with:
aa*3,bb,cc,dd
Because the code aa appears 3 times.
Another example might be: aa,aa,bb,bb,cc,cc,aa which would need to result in aa*3,bb*2,cc*2
Now, for each entry in the worksheet I won't know which codes repeat in a given cell or how many times they repeat and they are not guaranteed to be in the same order. So, for example:
aa,aa,bb,cc,aa,dd would also need to be transposed to aa*3,bb,cc,dd
The codes aa,bb,cc etc are all alphanumeric and the same length.
I'm struggling so any help gratefully accepted.
Regards.
Bookmarks