Chief Alchemist - Business Consulting For The 21st Century Via A Holistic & Intelligent Approach
Share RSS 2.0 feed for Sign up for the mailing list. Follow Chief Alchemist on Twitter. 'Like' the Chief Alchemist's page on Facebook. See what Chief Alchemist has been Q&A'ing on Quora. Chief Alchemist bookmarks & highlights on Follow the Chief Alchemist on Chief Alchemist channel on Chief Alchemist on Flickr. Mark 'Chief Alchemist' Simchock on LinkedIn. Free Initial Consultation. Email Chief Alchemist. Phone Chief Alchemist.
  • Mark ‘Chief Alchemist’ Simchock
  • 'Email me.Email => ca .at. ChiefAlchemist .dot. com
  • 'Phone me.Alchemy United => 732 997-0028
  • Free initial consultation.Free => Initial Consultation
  • Please be sure to subscribe to your communication channels of choice.
  • Click To Close => The small green (consultation), red (email) or blue (phone) icons in the top upper right.
Business Consulting For The 21st Century Via A Holistic & Intelligent Approach

Spreadsheet formula for getting the domain name from a URL

FYI => I won’t distract you with the details—just yet—but I was working on a Google Docs spreadsheet for a project and had to come up with a formula for getting the domain name from a full length URL.

Here is that formula:

= SUBSTITUTE (IF ( ISERROR(SEARCH(“/”, A11, 9)) , IF ( ISERROR(SEARCH(“?”, A11, 9)),MID ( A11,(SEARCH(“//”,A11,1)+2),LEN(A11)),MID(A11,(SEARCH(“//”,A11,1)+2), (SEARCH(“?”,A11,9)-(SEARCH(“//”,A11,1)+2) ))),MID(A11,(SEARCH(“//”,A11,1)+2), (SEARCH(“/”,A11,9)) – (SEARCH(“//”,A11,1)+2))), “www.”,”” , 1)

Note: A11 was the cell with the URL in it for the work I was doing. Your A11 will vary, obviously.

Disclaimers: This has not been fully tested. In other words, there might be some uniquely formatted domain name and/or URL that brings out a quirk.If you find a URL that doesn’t work please let me know.

Also, in its current form, if there’s a sub-domain, the sub-domain is included it as part of the results. It would be easy enough to modify to drop the sub-domain. Again, just let me know it that’s a need and I’ll tweak it when I get a chance.

  1. GlobeCore

    this one looks much easier to me:


Will not be published. Required.
Please include http://