How to validate links to external files in Excel

SaurabhT

New Member
Joined
Jul 1, 2016
Messages
2
I have an excel sheet which acts as an Index to documents in a folder structure on my system. The excel sheet has path of the documents and links to documents created using HYPERLINK formula. I want to validate the links to check if the referenced documents exist or not.

I really appreciate your effort.
 
check this link:
vba - Check if path to file is correct on Excel Column - Super User

Copy paste the code in VBA Project Explorer module :

<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">Function FileExist(path As String) As Boolean
If Dir(path) <> vbNullString Then FileExist = True
End Function

Now, go back to your spreadsheet view. Go into any cell and type:
<code style="margin: 0px; padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: pre-wrap;">=FileExist(A1)

Hope this helps to meet your requirement.</code>

</code>
 
Upvote 0
Thank you @Archies. It works great for file path. It does not work for links but it solves my issue for now.
Thank you so much.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top