How to change multiple hyperlink paths at once in Excel?
If you need to update the same file path or web address in multiple hyperlinks, you do not have to edit each link individually. You can replace the shared part of all the hyperlink addresses at once. This tutorial covers two ways to do it: using VBA or Kutools for Excel.
Change multiple hyperlink paths in the active worksheet with VBA
Change hyperlink paths in a selection, worksheets, or workbooks with Kutools for Excel
Compare the methods for changing multiple hyperlink paths
| Method | Best for | Key difference |
|---|---|---|
| VBA code | Replacing part of the hyperlink addresses on the active worksheet | Uses Excel's built-in VBA environment, but requires running a macro and is limited to the active sheet. |
| Kutools for Excel | Changing hyperlink paths in a selection, the active sheet, selected sheets, the active workbook, specific open workbooks or worksheets, or all open workbooks | Requires no code and lists the matching cells in the Navigation pane before you replace the paths. |
Change multiple hyperlink paths in the active worksheet with VBA
If the hyperlinks you want to update are all on the active worksheet, the following VBA code can replace the shared part of their file paths or addresses at once.

- Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
- Click Insert > Module, and paste the following macro into the Module window.
VBA code: Change multiple hyperlink paths at once
Sub ReplaceHyperlinks() 'Updated by Extendoffice Dim Ws As Worksheet Dim xHyperlink As Hyperlink Dim xOld As String, xNew As String Dim xTitleId As String xTitleId = "KutoolsforExcel" Set Ws = Application.ActiveSheet xOld = Application.InputBox("Old text:", xTitleId, "", Type:=2) xNew = Application.InputBox("New text:", xTitleId, "", Type:=2) Application.ScreenUpdating = False For Each xHyperlink In Ws.Hyperlinks xHyperlink.Address = Replace(xHyperlink.Address, xOld, xNew) Next Application.ScreenUpdating = True End Sub - Press F5 to run the code. In the first prompt box, enter the existing text in the hyperlink path, and then click OK.

- In the second prompt box, enter the new text you want to use in the hyperlink path.

- Click OK. The matching text in all hyperlink addresses on the active worksheet is replaced, as shown below.



Change hyperlink paths in a selection, worksheets, or workbooks with Kutools for Excel
For more control over where the hyperlinks are updated, use the Find and Replace feature in Kutools for Excel. It can search a selection, the active sheet, selected sheets, the active workbook, specific open workbooks or worksheets, or all open workbooks.
📝 Note:
To use this method, first download and install Kutools for Excel.
- Click Kutools > Navigation.

- In the Navigation pane, open the Find and Replace section, select the Replace tab, and then configure the following options:
- Enter the existing hyperlink text in the Find what box, and enter the new text in the Replace with box.
- Choose the area you want to search from the Within drop-down list.
- Select Hyperlinks from the Look in drop-down list.
- Click Find All. The cells containing matching hyperlink addresses are listed at the bottom of the pane.

- Click Replace All. The matching text in the hyperlink paths is replaced with the new text.

Click to Download Kutools for Excel for Free Trial!
Frequently Asked Questions
Will these methods change the text displayed in the cell?
No. The methods described above replace matching text in the hyperlink address. The cell's displayed text remains unchanged unless it is edited separately.
Can I change hyperlink paths in several workbooks at the same time?
The VBA code in this article works only on the active worksheet. Kutools can search specific open workbooks or all currently open workbooks in one operation.
Should I make a backup before replacing hyperlink paths?
Yes. A bulk replacement can affect many links at once, and changes made by a macro cannot be undone with Ctrl + Z. Save a backup copy first, especially when working with multiple sheets or workbooks.
Related articles:
- Extract Actual Addresses From Hyperlinks
- Supposing you have a range of cells which contain hyperlinks, and now you need to see the real destination of the hyperlinks and extract them from the hyperlinks as following screenshot shown. Are there any easy ways to solve this problem quickly?
- Convert Image URLs To Actual Images In Excel
- If you have a list of image URL addresses in column A, and now, you want to download the corresponding pictures from the URLs and display them into the adjacent column B as left screenshot shown. In Excel, how could you extract the actual pictures from the image URLs quickly and easily?
- Convert Url Text To Clickable Hyperlink In Excel
- Supposing you have multiple urls in your worksheet, but they are not linked, and now you need to convert all the unlinked urls to clickable hyperlinks, as following screenshots shown. Of course, you can double click them one by one to make them clickable, but this will be time consuming if there are lots of urls. How could you convert multiple unlinked urls to clickable hyperlinks automatically in Excel?
- Open A Specific Page Of PDF Document From Excel Hyperlink
- When you link a cell to a PDF file, normally, you will go to the first page of the PDF file when you click to open the hyperlink. If you need to directly jump to a specific page of the PDF file by clicking the hyperlink, this article may do you a favor.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.
- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in






