A hyperlink in Excel is a clickable link that directs users to another location, such as a website, file, or another sheet within the workbook. It makes navigation and referencing easier, particularly in large data sets. Hyperlinks in Excel make it easy to connect your data with web pages, documents, or other sheets. However, you may need to update them when links change, files are moved, or corrections are required.
To edit hyperlink in Excel, follow these steps:
➤ Press Ctrl + H to open the Find and Replace dialog.
➤ In Find what, type: http://oldsite.com
➤ In Replace with, type: https://newcompany.com
➤ Click Replace All.
In this article we will cover how to edit hyperlinks in Excel with methods like Edit Hyperlink dialogue box, VBA macro etc.
Manually Edit Using Edit Hyperlink Dialog Box
The Edit Hyperlink dialog box in Excel allows you to modify existing links, such as updating a URL, changing the display text, or redirecting a link to another file or worksheet. This method is best used when you have a small dataset or only need to update a few hyperlinks manually. For example, if your company’s website URL changes, you can use this method to quickly update links stored in your workbook.
Steps:
➤ Open your Excel Workbooks . We have a dataset that has Employee Name in Column A, Department in Column B and Profile Link in Column C.
➤ Click on the cell (e.g., C2 in the dataset above) that contains the hyperlink you want to update.
➤ Press Ctrl + K to open the dialog box directly and choose “Edit Hyperlink.
➤ In the dialog box, go to the “Address” field at the bottom. You will see the old link (e.g., http://oldsite.com/johnsmith).
➤ Replace the old link (e.g., http://oldsite.com/johnsmith) with the new one (https://newcompany.com/hr/johnsmith).
➤ Then click OK.
The cell now points to the new destination and, if edited, shows updated display text.
➤ Repeat this process for other links.
Use Find and Replace Tool to Edit Hyperlink in Excel
The HYPERLINK function in Excel creates clickable links with a formula instead of using the Insert Hyperlink dialog box. This method is very useful when you have structured datasets where links follow a pattern (e.g., departmental files stored under a common domain). You should use this method if you need to update multiple links consistently by editing formulas or applying Find & Replace.
The company shifted its documentation to a new server. Using the Formula Bar editing or Find & Replace on formulas, all hyperlinks were updated to reflect the new domain. This ensures users can still click and open the latest documents directly from Excel.
Steps:
➤ Open your Excel Workbooks . We have a dataset that has Project Code in Column A, Project Name in Column B and Document link in Column C. We want to replace the hyperlink in Column C from oldsite.com to newcompany.com
➤ Press Ctrl + H to open the Find and Replace dialog.
➤ In Find what, type: http://oldsite.com
➤ In Replace with, type: https://newcompany.com
➤ Click Replace All.
➤ Updated tables with the edited hyperlinks are clearly present.
Using VBA Macro for Automated Editing Hyperlink in Excel
The VBA (Visual Basic for Applications) method allows you to quickly edit or update multiple hyperlinks in bulk. This is useful when file paths, folder names, or domains change, and manually editing each link would be time-consuming. VBA can loop through all cells, shapes, or objects containing hyperlinks and update their Address or TextToDisplay values.
The purchasing department moved supplier contracts from C:\OldDrive\Docs\ to D:\NewDrive\Contracts\. Instead of manually editing dozens of hyperlinks, we will use a simple VBA macro to update all hyperlink addresses at once.
Steps:
➤ In our workbook we have Supplier ID in Column A, Supplier Name in Column B and Contact Link in Column C.
➤ To press Alt + F11 to open the VBA Editor window. Go to Insert > Module.
➤ A blank code window will open. Paste the following VBA code in the module window.
Sub UpdateHyperlinksSafe()
Dim ws As Worksheet
Dim hLink As Hyperlink
For Each ws In ThisWorkbook.Worksheets
For Each hLink In ws.Hyperlinks
' Check if hyperlink address contains the old path
If hLink.Address <> "" And InStr(1, hLink.Address, "C:\OldDrive\Docs\", vbTextCompare) > 0 Then
hLink.Address = Replace(hLink.Address, "C:\OldDrive\Docs\", "D:\NewDrive\Contracts\")
End If
' Update display text only if it contains "Docs"
If InStr(1, hLink.TextToDisplay, "Docs", vbTextCompare) > 0 Then
hLink.TextToDisplay = Replace(hLink.TextToDisplay, "Docs", "Contracts")
End If
Next hLink
Next ws
MsgBox "Hyperlinks updated!"
End Sub
➤ Press F5 in the VBA editor or go back to Excel.
➤ All hyperlinks on the active sheet will now be updated to the new drive path.
Note:
Ensure Macros are enabled
Frequently Asked Questions
How do I edit hyperlinks in Excel?
Right-click the cell with the hyperlink, choose Edit Hyperlink, and change the link or text.
Why is the edit link not working in Excel?
This usually happens if the cell is locked, the sheet is protected, or the link is broken. Unprotect the sheet or check the file path.
How do you control a hyperlink in Excel?
You can manage hyperlinks through the Insert > Link option or by right-clicking and choosing edit/remove options.
How do I edit all hyperlinks in Word?
Press Ctrl + H to open Find and Replace, search for the old URL, and replace it with the new one across all hyperlinks.
Concluding Words
Editing hyperlinks in Excel is an easy process using the Edit Hyperlink method. You can download the excel file that contains all the dataset we have used in this article. You can practice there and let us know your thoughts in the comment section.