• Excel Video Tutorials

How to Convert URL Text to Clickable Hyperlink in Excel?

Have you ever tried to convert a text to a hyperlink in Excel? If you are facing any difficulty, this article will help you complete the task. The HYPERLINK function creates a shortcut that jumps to another location in the current workbook or opens a document stored on a network server, an intranet, or the Internet.

When you click a cell that contains a HYPERLINK function, Excel jumps to the location listed or opens the document you specified. If you try to convert the text to a hyperlink in Excel using the direct menu from the right-click menu, then it can be a boring and old process. And also, if the texts are spread out on the sheet at different locations, i.e., not in the form of a list, then it can be a time-consuming process to complete our task. We can solve this problem in a quicker way using the VBA application. Read this tutorial to learn the process of converting URL text to a clickable hyperlink in Excel.

Converting URL Text to Clickable Hyperlink in Excel

Here we will first open the VBA application and use the VBA code to convert the URLs to hyperlinks. Let us look at a simple procedure for converting URL texts to clickable hyperlinks in Excel using the VBA application.

Step 1

Let us consider an Excel sheet where we have a list of URL texts similar to the below image.

Now right-click on the sheet name and select View Code to open the VBA application.

Right-click -> View Code

Step 2

Click "Insert" and select "Module," then type the following program code in the textbox −


Sub ConvertToHyperlinks()
'Updated By Nirmla
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "Converrt Hyper Link"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
    Application.ActiveSheet.Hyperlinks.Add Rng, Rng.Value
End Sub

Step 3

Then save the sheet as a macro-enabled workbook, click F5 to run the code, select the range of texts you want to convert to hyperlinks, and click OK, as shown in the below image.

Save > F5 > Select range > Ok


In this tutorial, we used a simple example to demonstrate how you can convert text to hyperlinks in Excel.