Trim URL to ROOT/SUBDOMAIN with Excel

前端 未结 4 647
小蘑菇
小蘑菇 2020-12-06 08:46

I need to trim URL\'s in Microsoft Excel to the root domain and to the subdomain.

A1 = Contains https://blog.example.com/page/

4条回答
  •  心在旅途
    2020-12-06 08:55

    For B1 (Extracting root domain), If A1 is complete URL:

    =SUBSTITUTE(SUBSTITUTE(REPLACE(A1,1,FIND(".",$A1),""),REPLACE(REPLACE(A1,1,FIND(".",$A1),""),1,FIND("/",REPLACE(A1,1,FIND(".",$A1),"")),""),""),"/","")
    

提交回复
热议问题