- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 −
Program
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 Next 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
Conclusion
In this tutorial, we used a simple example to demonstrate how you can convert text to hyperlinks in Excel.