Marcro or formula to extract urls from a bunch of text in a column of cells

dominicp

New Member
Joined
Nov 3, 2009
Messages
15
I have a column of cells over 2000 rows that have a bunch of text in each cell. In the middle of this text in each cell are websites (not hyperlinked). I was wondering if someone wrote a macro or formula to extract URLs located in a bunch of text? I can parse this out but doing some delimiting but that will take longer.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Can you a list of examples: both the full text and the URL you want to grab.
 
Upvote 0
Text in cells:
"AccessTurnkey Management Ataturk Cad. No. 72 Kozyatagi Istanbul 34736 P: +980 (216) 468 10 15 Firm Type: Asset Mangement Established: 1999 AccessTurnkey Management is an asset management firm that seeks hedge fund, venture capital, private equity, and real estate investments. www.accessturnkey.com The Firm's looks for growth equity investments and control buyouts of middle-market companies with operations and primary business activities. Prospective companies typically have annual revenues of $25 to $400 million and operating income of at least $2 million.

URL to capture: www.accessturkey.com

The urls typically start with www.. and not http:// . I don't think all of them are .com domain.
 
Upvote 0
So you want to grab anything until you reach a space after the second . after the www?
 
Upvote 0
Is this all in 1 cell?
 
Upvote 0
Code:
Sub fff()
    For Each r In Columns(1).SpecialCells(2, 2)
        r.Offset(, 1) = "www" & Split(Split([A1], "www")(1))(0)
    Next
End Sub
 
Upvote 0
thanks for the code...i'm a bit of a beginner, Dow I need to modify depending on what column the text is sitting in? in my case its in column G and I'd like the URls to go into column H.
 
Upvote 0

Forum statistics

Threads
1,213,562
Messages
6,114,326
Members
448,564
Latest member
ED38

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