How to Extract All Hyperlinks in a Worksheet

When you work with an Excel file with multiple cells and each cell has its hyperlink. If you want to extract what the links are, please follow the steps below:

Step 1: Pressing shortcut "Alt+F11" to open the Microsoft Visual Basic for Applications window;

Alternatively, please click the "Developer" tab from the ribbon and click "Visual Basic" to open the window.

Step 2: In the new window, click the "Insert" tab from the ribbon, and click "Module";

Step 3: Copy and paste the following codes in the Module window;

Sub ExtractHL()
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
HL.Range.Offset(0, 1).Value = HL.Address
Next
End Sub

Step 4: Click the "Run Sub" button (or press the F5 key) to run the codes;

Step 5: Come back to the Excel file, and you will see the hyperlinks are now in the next column.

Leave a Reply