Remove Domain from a URL in Excel

lumineers01

New Member
Joined
Dec 7, 2013
Messages
44
I'm dissecting urls for SEO purposes and I'm searched all forums for a formula that can remove the domain from a url, but can't seem to find the formula that returns favorable results. This is what I want to do:


https://www.walsallhealthcare.nhs.uk/contact-us/useful-links/subject-categories.aspx
--> contact-us/useful-links/subject-categories.aspx



I'm using this formula in Excel to remove domain. However this doesn't work for secured sites, and I always have to replace "8" with "9" to make it work. Is there any way to make this work for both http and https websites?


=MID(A1,FIND("/",A1,8),LEN(A1)+1-FIND("/",A1,8))

Also, I want to remove the "/" at the beginning. Is this possible?


Thank you so much!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Could you provide a few samples of the URL's you are working with? (both versions please?)
Im thinking that a len()-len(substitute()) might be what you need
 
Upvote 0
Does this work:

=MID(A1,FIND("|",SUBSTITUTE(A1,"/","|",3),1)+1,199)
 
Upvote 0

Forum statistics

Threads
1,215,331
Messages
6,124,311
Members
449,152
Latest member
PressEscape

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