I already searched for formulas or add ins online but can't seem to find any formula for this.
I was wondering if I can remove everything after a question mark in a URL?
http://www.site.com/index.php?98943j%klr
to
http://www.site.com/index.php
Thanks!
Try
=IF(LEN(SUBSTITUTE(A1,"?",""))=LEN(A1),A1,LEFT(A1,FIND("?",A1)-1))
to
?
not appearing in A1 without raising an errorhttp://www.site.com/index.php
.... your accepted answer doesnt adjust for the position of ?
and it will return http://www.site.com/index.php?
If you want to return another hyperlink, but only cosisting of everything before the question mark, you could use the following formula, having you URL in cell A1
.
=HYPERLINK(LEFT(A1,FIND("?",A1,1)-1))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With