Hello stranula,
Important when you put your examples that they are realistic.
Assuming that they are, it means that you already know where to find the common starting string. It is always the 19 first characters. Then you could do it like this...
Or even more simple, with a formula somewhere on your sheet.
Assuming that your examples are not realistic and that the common starting string could vary in length between datasets, then something like this could work (I am sure someone here could do it better, but it works
)
Let us know if this helped you or if you need something else.
Good luck!
Bookmarks