Checking validity of hyperlinks in Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-2273224%22%20slang%3D%22en-US%22%3EChecking%20validity%20of%20hyperlinks%20in%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2273224%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHi%20there%20-%20I%20was%20just%20wondering%20if%20MS%20Excel%20has%20feature%20in%20which%20you%20can%20check%20the%20validity%20of%20hyperlinked%20documents%2C%20similar%26nbsp%3Bto%20the%20feature%20Adobe%20has%20in%20their%20hyperlinking%20plug-in%20which%20creates%20Link%20Reports%3F%20Just%20to%20ensure%20all%20the%20links%20are%20working%20in%20a%20spreadsheet.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20do%20a%20lot%20of%20hyperlinking%20in%20Adobe%20and%20Excel%20but%20cannot%20check%20if%20all%20the%20Excel%20links%20are%20working%20without%20clicking%20each%20one.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2273224%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hi there - I was just wondering if MS Excel has feature in which you can check the validity of hyperlinked documents, similar to the feature Adobe has in their hyperlinking plug-in which creates Link Reports? Just to ensure all the links are working in a spreadsheet.

 

I do a lot of hyperlinking in Adobe and Excel but cannot check if all the Excel links are working without clicking each one. 

1 Reply

@tridgill 

How do I find broken links in Excel?

There are different ways to check whether the hyperlinks are OK or not.
Here are two quick methods.

 

Method 1:
Cell Relationship Diagram
In the menu bar, select the Files> Options tab.
In the opened Excel Options window, click the Add-ins tab.
Now select the COM add-in from the drop-down list and press the OK button. In the open com add-in dialog box, choose Inquiries.
After that, you will see the Inquiries tab is added to the Excel ribbon.
In the diagram group, you need to select Cell Relationship.
The next window of the cell relationship diagram appears on the screen.
In the opened dialog box, select the options you want and press the OK button.
Very soon the diagram will appear on your Excel screen.
You can zoom in to see the links between a cell and another cell, or between a cell and another worksheet.
Here you can see the entire cell relationship diagram with all the links included. You can also use this chart to review the broken links in your Excel workbook.
I found this method to be the best way to find the cell with the broken Excel links.

 

Method 2:
Using Excel VBA
Another method to find broken Excel link is by using Excel VBA. In this method, we use the massive code to trace the broken link to an Excel workbook cell.

You can also restore the return value of the accessing source links to determine whether the links are actually broken or not.

To use the code, you need to add the Microsoft XML V3 reference:

 

Private Function CheckHyperlink(HypelinksCell As Range) As String

On Error GoTo ErrorHandler

Dim oHttp As New MSXML2.XMLHTTP30

oHttp.Open “HEAD”, HypelinksCell.Text, False

oHttp.send

CheckHyperlink = oHttp.Status & ” ” & oHttp.statusText

Exit Function

ErrorHandler:

CheckHyperlink = “Error: ” & Err.Description

End Function

Sub Test()

Debug.Print CheckHyperlink(Range(“A1”))

End Sub

 

With the above code, you can easily keep track of the broken link details of each worksheet cell.

Once you know the exact location of the broken link, move on to fixing the broken Excel link.

 

How do I fix broken links in Excel?
Warning: This step cannot be undone. So it is better that you keep the backup of your Excel workbook before starting the process.

Open your Excel workbook with the broken links problem.
Go to the Data tab and tap on the Edit Links option. If you don't get the "Edit Links" option, it means there are no links in your workbook.
Now select the broken link that you want to fix in the Source file field.
Click the Change Source option.
Find the location of the Excel file with the source of your linked data.
Now select the new source file and click on the Change Source option.
Tap the Close option.

 

Hope I was able to help you with this information from the internet.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.