This post will guide you how to convert plain URLs to clickable links in Excel. How do I convert text URLs to clickable links with VBA Macro in Excel. How to convert a list of text links into hyperlinks in Excel.
Table of Contents
1. Convert Text URLs to Clickable Links using VBA
Assuming that you have a list of data in range B1:B4, which contain text links, and you want to change those text link as clickable links or hyperlinks in your worksheet, how to achieve it. You can write an Excel VBA Macro to convert plain URLs as clickable links quickly. Just do the following steps:
#1 select cells that contain Text URLs
#2 open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.
#3 then the “Visual Basic Editor” window will appear.
#4 click “Insert” ->”Module” to create a new module.
#5 paste the below VBA code into the code window. Then clicking “Save” button.
Sub ConvertTextURLsToHyperlinks()
Dim Cell As Range
For Each Cell In Intersect(Selection, ActiveSheet.UsedRange)
If Cell <> "" Then
ActiveSheet.Hyperlinks.Add Cell, Cell.Value
End If
Next
End Sub
#6 back to the current worksheet, then run the above excel macro. Click Run button.
#7 Let’s see the result:
You will see that the selected text URLs have been converted to the clickable hyperlinks in your worksheet.
2. Video: Convert Text URLs to Clickable Links
This Excel video tutorial will show you how to convert plain URLs to clickable links using VBA Macro in Excel.
Leave a Reply
You must be logged in to post a comment.