Split URL after certain text

lavezzi7

New Member
Joined
Dec 12, 2017
Messages
15
Hey guys,

I have a couple of URLs that contain the "origin?" text before the part I want to extract. For example:

wwwXXXX.com/ie-de/origin=10_se_Display_native
wwwXXXX.com/ia-de/de/origin=10_se_Display_on
wwwXXXX.com/ia-it/de/origin=10_se_Display_off

I want to create a new column containing the text after "origin=". In this case the new column should contain:

10_se_Display_native
10_se_Display_on
10_se_Display_off

Is there a formula to automatically get that? Please note that neither the part I want to get nor the other part has the same amount of characters among the URLs so I cannot use position-related formulas.

Any kind of help would be very much appreciated!

Thank you in advance!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
You could try this, but it assumes that there is nothing after the end of what you have in your examples, it will get up to 50 characters after the "=", it also assumes there is only 1 "=" in the line.

Code:
=MID(A1,(FIND("=",A1)+1),50)

The above also assumes your data starts in A1, if different update as necessary.
 
Upvote 0
Assuming data starts in cell A1, place this formula in B1 and copy it down: =MID(A1,SEARCH("origin=",A1,1)+7,999)
 
Upvote 0
@philwojo: I just thought I would mention that if the url for some reason contains an equal sign before the one associated with the word "origin", your formula will not return the correct value.
 
Upvote 0
Hey guys,

Thanks a lot for the help but the formula does not seem to work i get the following error:

38b1b648-6844-4b27-80db-638e4b8f225c.png
 
Upvote 0
Both formulas had the same result. I created a new sheet and copy pasted a link to A1 just to test.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top