{"id":9710,"date":"2022-05-17T18:35:26","date_gmt":"2022-05-17T18:35:26","guid":{"rendered":"https:\/\/officetuts.net\/excel\/?p=9710"},"modified":"2024-02-19T14:52:24","modified_gmt":"2024-02-19T14:52:24","slug":"extract-domain-from-url","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/formulas\/extract-domain-from-url\/","title":{"rendered":"Extract Domain from URL in Excel"},"content":{"rendered":"\n
You can use Excel to process huge lists of URLs and generate useful reports such as a report on new links to a website. To accomplish this easily you will first need to extract domain names from the URLs.<\/p>\n\n\n\n
A domain name is a unique website address that appears after www.<\/strong> and before the first slash (\/) character in a web address. For example, in the URL https:\/\/codeigo.com\/python\/convert-csv-to-excel\/<\/a>, the domain name is codeigo.com<\/a>.<\/p>\n\n\n\n In this tutorial, we will look at the following 3 methods that can be used to extract domain names from URLs:<\/p>\n\n\n\n Step 1<\/strong> \u2013 Select Cell B2<\/strong> and key in the following formula.<\/p>\n\n\n\n Step 2<\/strong> \u2013 Press Enter<\/strong> key and since the data is in a table, Excel automatically copies the formula to all the cells in Column B<\/strong>:<\/p>\n\n\n\n\n
Method 1: Use of an Excel Formula<\/h2>\n\n\n\n
=IF(ISERROR(FIND(\"\/\/www.\",A2)), MID(A2,FIND(\":\",A2,4)+3,FIND(\"\/\",A2,9)-FIND(\":\",A2,4)-3), MID(A2,FIND(\":\",A2,4)+7,FIND(\"\/\",A2,9)-FIND(\":\",A2,4)-7))<\/code><\/pre>\n\n\n\n