Hello,
Is there a way to collapse the first repeated characters of a string into a single character? My current data looks like the one in column Object2 and I want to transform it so it looks like the one in Result.
In other words, if a string inside a cell starts with 3 'Cs', I want the result to be the same string but starting with only one 'C' instead of three. If the cell starts with a character that doesn't repeat, it should stay as such. My cells have a variable number of repeated first characters (from 2 to n). I hope this is clear enough, if not, I'll provide further info.
Thanks in advance,
alecambo
Is there a way to collapse the first repeated characters of a string into a single character? My current data looks like the one in column Object2 and I want to transform it so it looks like the one in Result.
In other words, if a string inside a cell starts with 3 'Cs', I want the result to be the same string but starting with only one 'C' instead of three. If the cell starts with a character that doesn't repeat, it should stay as such. My cells have a variable number of repeated first characters (from 2 to n). I hope this is clear enough, if not, I'll provide further info.
| Result | |
| CJJGLLQ | |
| AUUPPOSZYLGHMERRLFJIOWWKAYAYHQQRQ | |
| LXAAIVJJOOPKRWWVIALXLYGEGCZSMAATFFOJPIVWVGXXLCCGZESWWV | |
RGYYOYJFKSELM | RGYYOYJFKSELM |
Thanks in advance,
alecambo