title: EXCEL url to domain
body: <p>i have been searching and working at this for several hours now.</p>
  
  <p>I currently have a formula that converts URL's to domains (column B), but it is unable to handle domains such as "co.uk" the formula also should not rely on the presence of "www" or "http://" on the upside there is no information after the TLD (.com, .co.uk, etc)</p>
  
  <blockquote>
    <p>example.com results in <strong>example.com</strong></p>
    
    <p>test.example.com results in <strong>example.com</strong></p>
    
    <p>www.example.com results in <strong>example.com</strong></p>
    
    <p>example.co.uk results in <strong>co.uk</strong> which is wrong</p>
    
    <p>www.example.ab.kr results in <strong>ab.kr</strong> which is also wrong</p>
    
    <p>example.ab.kr results in <strong>ab.kr</strong> which is also wrong</p>
  </blockquote>
  
  <p>the current excel formula:</p>
  
  <pre><code>=SUBSTITUTE(TRIM(RIGHT(SUBSTITUTE(REPLACE(REPLACE(A1, 1, IFERROR(FIND("//", A1)+1, 0), TEXT(,))&amp;"/", FIND("/", REPLACE(A1, 1, IFERROR(FIND("//", A1)+1, 0), TEXT(,))&amp;"/"), LEN(A1), TEXT(,)), CHAR(46), REPT(CHAR(32), LEN(A1))), LEN(A1)*2)), CHAR(32), CHAR(46))
  </code></pre>
  
  <p>does anyone have any thoughts on how to make sure the output includes any of the combinations? as my name eludes; i am average in excel and need your help :P</p>