In this tutorial, I will explain how to edit a hyperlink in excel. Usually, we use hyperlinks often to serve different purposes such as: to go to a specific website, a location in the existing workbook, or opening a new excel file. In addition, you can open a different document or create email messages. However, you might need to edit these hyperlinks at times or fix broken ones. So, let’s see how we can edit hyperlinks.
Download Practice Workbook
You can download the practice workbook that we have used to prepare this article.
5 Quick & Easy Ways to Edit Hyperlink in Excel
In my excel file, I have created several hyperlinks as below. Now, I will show you how to edit some of them.
1. Edit Hyperlink through a Simple Right-Click in Excel
The easiest option to edit hyperlinks is to right-click on the active cell and thus edit later. For instance, Cell B5 is hyperlinked to www.exceldemy.com and I want to edit the link to www.google.com.
- Right-click on Cell B5 and select the Edit Hyperlink.
- As a result, the Edit Hyperlink dialog box will show up.
- Next, I have replaced ‘exceldemy’ with ‘google’ in the fields: Text to display and Address. You can edit as you require and then click OK.
- As a consequence, the hyperlink in Cell B5 will direct you to google.com. You can change other hyperlinks by following the above method; depending on the type of the links.
Read More: [Fix:] Edit Links in Excel Not Working
2. Use Link Option to Modify Hyperlink (from Insert Tab in Excel)
We can modify hyperlinks from the Insert tab in excel. For example, I will change the hyperlink of Cell B5 to www.microsoft.com.
- Click on the hyperlink containing cell (Cell B5).
- Go to Insert > Link (Links group).
- Now, go to Link > Insert Link.
- Then, the Edit Hyperlink dialog box will show up. Put ‘microsoft’ here like we showed in the procedure of Method 1 and click OK (see screenshot).
- Finally, the modified hyperlink will direct us to the updated website.
Read More: How to Edit Links in Excel (3 Methods)
3. Edit Multiple Hyperlink Path at Once (VBA)
Sometimes, we have multiple cells hyperlinked to the same address. In that case, if we can change the address of those multiple cells at once, that will save a lot of time. For instance, I have several cells that are hyperlinked to www.exceldemy.com. Now I will convert this path to www.google.com using VBA.
- First, go to the sheet where the cells are hyperlinked and right-click on the sheet name, and select the View Code option.
- Next, Microsoft Visual Basic for Applications window will show up. Write the below code in the Module.
Sub EditHyperlinks() Dim Sheet As Worksheet Dim xhyperlink As Hyperlink Dim xPast As String, xChanged As String xTitleId = "EditHyperlink" Set Sheet = Application.ActiveSheet xPast = Application.InputBox("Former text:", xTitleId, "", Type:=2) xChanged = Application.InputBox("Changed text:", xTitleId, "", Type:=2) Application.ScreenUpdating = False For Each xhyperlink In Sheet.Hyperlinks xhyperlink.Address = Replace(xhyperlink.Address, xPast, xChanged) Next Application.ScreenUpdating = True End Sub
- Run the code using the F5 Upon running the code the below window (EditHyperlink) will show up. Then write ‘exceldemy’ in the field ‘Former text’ and click OK. I have put ‘exceldemy’ as our existing hyperlinks contain this word in the path.
- After you click OK again, the EditHyperlink window will show up. Now enter the new website address (google) in the ‘Changed text’ field and click OK.
- Consequently, all hyperlinked addresses are changed to www.google.com.
- How to Edit a Cell in Excel (4 Easy Methods)
- How to Unlock Excel Sheet for Editing (With Quick Steps)
- How to Edit Name Box in Excel (Edit, Change Range and Delete)
- 7 Solutions for Greyed Out Edit Links or Change Source Option in Excel
- How to Edit Defined Names in Excel (Step-by-Step Guideline)
4. Edit Broken Hyperlink in Excel
Sometimes, hyperlinks do not work as expected. The reason might be that you have entered the wrong web addresses or wrong file path and so on. Let’s see how to fix these broken links. Such as if your web address is not correct, you will see the below warning (see the screenshot).
To fix the above symptom, we will follow the below steps.
- Go to the hyperlink containing cell (Cell B5) and right-click on it to bring the Edit Hyperlink dialog box.
- Then fix the URL in the Address field. For example, I have replaced ‘exceldem’ with ‘exceldemy’. Next, click OK.
- As a result, the broken link will be fixed and the link will direct us to the website.
- In case your hyperlink cannot open a specific file, you have to update the file path as below and click OK (see the screenshot).
5. Modify Hyperlink If Appears as String
Sometimes when we copy addresses to excel cells, those URLs might not look like clickable hyperlinks. Those links will merely look like text strings. For example, I have some web addresses copied to my excel file.
To convert above URLs to hyperlinks, follow the below steps.
- Just double-click on the cell containing the non-clickable URL (Cell B5) and hit Enter.
- As a result, excel will automatically convert the URL to a hyperlink.
Read More: How to Edit a Cell in Excel without Double Clicking (3 Easy Ways)
Modify Hyperlink Appearance in Excel
We know that by default the color of hyperlinks is blue. If you want to change the color of the hyperlink of a selected cell, follow the below steps.
- Select the Cell B5.
- Go to Home > Cell Styles (Styles group).
- Next, from Cell Styles, right-click on the Following Hyperlink and click on Modify.
- Consequently, the Style dialog box will pop up. Click on the Format.
- Clicking on the Format will direct you to the Format Cells window. You can change font style, size, color, etc, from there. After you are done with the editing, click OK. I have changed the Font Color only.
- Upon clicking OK, you will see the changes in the Style dialog, again click OK.
- Now, double-click on Cell B5, and the hyperlink will be modified to changed color.
➤ You can change the color of the hyperlinks that are not clicked yet by following the path:
Home > Cells Styles > Hyperlink.
➤ You cannot change the color of only one hyperlink following the above method, the color of all the hyperlinks in the workbook will change.
In the above article, I have tried to discuss several methods to edit the hyperlink in excel elaborately. Hopefully, these methods and explanations will be enough to solve your problems. Please let me know if you have any queries.