Extracting URLs domain name from various URL domain combos

thp510

Board Regular
Joined
Oct 19, 2015
Messages
110
Office Version
  1. 365
Platform
  1. Windows
I have various lists of website URLs in all shapes and sizes and I want to just have each website to be in this format: www.[insert your domain name].com Examples:

Column A
www.normals.com (pretty straight and fwd. About 80% of my list is like this and I don't need to change this)
https://www.securityreview.com (there's an http in front of the www and also there's an S in http)
http://raodstop.com/ (there's an http in front and there's no www)
www.raodstop.com/p/gda/31/ext (there's a lot of text in this URL after the .com portion)
truradio.de (there's no http or www for this URL. Plus I'd like to keep the full domain on this so it's www.truradio.de and NOT www.trueradio.de.com)


Does anyone have a formula that I can use to trim down column A and add www. AND also add .com to all of them?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
this works for your sample data

=IFERROR(LEFT(A1,FIND(".com",A1)+3),"www."&A1)
 
Upvote 0
Hi, here's another take..:


Excel 2013/2016
AB
1www.normals.comwww.normals.com
2https://www.securityreview.comwww.securityreview.com
3http://raodstop.com/www.raodstop.com
4www.raodstop.com/p/gda/31/extwww.raodstop.com
5truradio.dewww.truradio.de
Sheet1
Cell Formulas
RangeFormula
B1="www."&TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"www.","",1),"http://","",1),"https://","",1),"/",REPT(" ",255)),255))
 
Upvote 0
This is amazing! Thank you so much. It worked!!!!


Hi, here's another take..:

Excel 2013/2016
AB
www.normals.com
https://www.securityreview.comwww.securityreview.com
http://raodstop.com/www.raodstop.com
www.raodstop.com/p/gda/31/extwww.raodstop.com
truradio.dewww.truradio.de

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="bgcolor: #FFFF00"]www.normals.com[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B1[/TH]
[TD="align: left"]="www."&TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"www.","",1),"http://","",1),"https://","",1),"/",REPT(" ",255)),255))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top