We have various urls posted into our sheet that sometimes are not valid urls for what we need. So we need to strip some data from it and append some data to the end.
EXAMPLE
needs stripping to
and then appending with
refer/?size=web
Leaving me with
Ideally this needs doing on the fly, so when an invalid url is entered. The function converts it and adds the part on the end, so perhaps I can apply a function to the column or within Google App Script using Javascript
I have had a tinker with the functions here which only deal with the extraction part but no joy yet
https://stackoverflow.com/questions/20717566/excel-remove-everything-after-in-a-url
EXAMPLE
Code:
https://www.myurl.com/p/Bce6o9tg0XZ/?utm_source=google&utm_medium=cpc
Code:
https://www.myurl.com/p/Bce6o9tg0XZ/
refer/?size=web
Leaving me with
Code:
https://www.myurl.com/p/Bce6o9tg0XZ/refer/?size=web
I have had a tinker with the functions here which only deal with the extraction part but no joy yet
https://stackoverflow.com/questions/20717566/excel-remove-everything-after-in-a-url
Last edited by a moderator: