I need to trim URL\'s in Microsoft Excel to the root domain and to the subdomain.
A1 = Contains https://blog.example.com/page/
https://blog.example.com/page/
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),"")),""),""),"/","")