How to extract domain from a URL in Excel

This is just a quick tip. Let’s say that you’ve got “http://www.google.com/search?q=1234″ in cell B1 in Excel, but you want to display “google.com”. You can use this formula:

=SUBSTITUTE(MID(B1, FIND(“//”, B1)+2, FIND(“/”, B1, FIND(“//”, B1)+2)-8), “www.”, “”)

This isn’t perfect as it assumes you always use “http://”, ┬ábut it works pretty well for a quick, easy fix.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>