Does anyone know a formula for removing the last question mark in a URL string?
Does anyone know a formula for removing the last question mark in a URL string?
Maybe something like this:
=SUBSTITUTE(A1,"?","",LEN(A1)-LEN(SUBSTITUTE(A1,"?","")))
Show us a few examples of what you have and what you want.
Last edited by Tony Valko; 07-21-2015 at 01:49 PM.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Samples would help.
If it is the very last character, then maybe...
=LEFT(A1,LEN(A1)-1)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
try this:
=SUBSTITUTE(A1,RIGHT(A1,1),REPT(" ",1000))
If I've helped U pls click on d *Add Reputation
Before
http://abc.com/join?
http://abc.com/join?WT.mc_id=10938&u...quote_request?
After
http://abc.com/join
http://abc.com/join?WT.mc_id=10938&u..._quote_request
The last ? mark should be removed thanks.
Also not all the URL's have a ? mark at the end so removing the last character wouldn't work as it would break the URL.
OK, the formula in reply #2 should do what you want.
then Tony's formula should do the trick or:
=SUBSTITUTE(A1,"?",REPT(" ",1000))
Tried both but both removed a portion of the URL
http://forms.abc.com/autos/battery-s..._quote_request
=SUBSTITUTE(H27616,"?","",LEN(H27616)-LEN(SUBSTITUTE(H27616,"?",""))) <--this removed the ? mark after service.
=SUBSTITUTE(H27617,"?",REPT(" ",1000)) <--This removed everything everything after the word service.
did you try the formulas on the samples you provided?
can you post the data in cells H27617 and H27616
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks