This formula will give you a clean base path of a given URL
Example:
URL | Just Domain | Base Path |
---|---|---|
http://www.amazon.com/Totally-Free-kindle-Books/lm/R27UG52OAM3TFX | amazon.com | www.amazon.com |
=IF(ISERROR(FIND("//www.",A2)), MID(A2,FIND(":",A2,4)+3,FIND("/",A2,9)-FIND(":",A2,4)-3), MID(A2,FIND(":",A2,4)+7,FIND("/",A2,9)-FIND(":",A2,4)-7))
=MID(A2,FIND(":",A2,4)+3,FIND("/",A2,9)-FIND(":",A2,4)-3)