How to extract Url and make it clickable automatically?

happydz

New Member
Joined
Jan 11, 2017
Messages
41
Hello,
I have a set of websites listed in an excel sheet, I tried to extract hyperlink using VBA code (I found it online), but I find out that they not clickable. Could you edit it or give another trick to fix this problem, please?

VBA Code:
Sub ExtractHL()
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
HL.Range.Offset(0, 1).Value = HL.Address
Next
End Sub
 
The following will accomplish your goal :

VBA Code:
'' NOTE: First select the cells for conversion, then click the button :

Sub ConvertTextURLsToHyperlinks()
    Dim Cell As Range
    For Each Cell In Intersect(Selection, ActiveSheet.UsedRange)
        If Cell <> "" Then
            ActiveSheet.Hyperlinks.Add Cell, "HTTP://" & Cell.Value & ".com"
            Cell.Offset(0, 1).Value = GiveMeURL(Cell)
        End If
    Next
End Sub


Function GiveMeURL(rng As Range) As String
   On Error Resume Next
   GiveMeURL = rng.Hyperlinks(1).Address
End Function
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I dont understand having to click twice. Here it only requires one click to initiate the link.
Ok, I tried this macro code that I thought it extracts and activates (makes it clickable) the hyperlinks simultaneously, but it only extracts unclickable hyperlinks in the next column (I need to click on the extracted hyperlinks one by one manyally in order to make it clickable; small hand cursor will show up to indicates that the link has become clickable)

macro code that I tried
VBA Code:
Sub ExtractHL()
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
HL.Range.Offset(0, 1).Value = HL.Address
Next
End Sub
 
Upvote 0
Do I understand you want the listings in Col A to remain as they are. You want the adjoining cell in Col B to display the clickable URL link ?
And you only want this to occur one row at a time, as you click on the listing in Col A ?

This is becoming very convoluted and confusing. What it sound like you are asking for is not very user friendly.

?????
 
Upvote 0
Do I understand you want the listings in Col A to remain as they are. You want the adjoining cell in Col B to display the clickable URL link ?
And you only want this to occur one row at a time, as you click on the listing in Col A ?

This is becoming very convoluted and confusing. What it sound like you are asking for is not very user friendly.

?????
Thank you for your help, I really appreciate it
It seems the only way to extract the hyperlinks and make them clickable simultaneously (after running the macro code) is by saving the worksheet in pdf, that's way I will get the websites listed in Col A and the extracted hyperlinks (clickable)in Col B.
Unfortunately, there's not way to get this done using macro code without saving the work in pdf.
Thank you again.
 
Upvote 0

Forum statistics

Threads
1,215,644
Messages
6,125,992
Members
449,278
Latest member
MOMOBI

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