+ Reply to Thread
Results 1 to 6 of 6

Detect Broken Hyperlinks when Hyperlink formula is used

  1. #1
    Registered User
    Join Date
    10-27-2015
    Location
    Dublin, Ireland
    MS-Off Ver
    2013
    Posts
    4

    Cool Detect Broken Hyperlinks when Hyperlink formula is used

    I have column of hyperlinks that point to files on my network, the hyperlinks are made with the hyperlink formula instead of the usual way of inserting hyperlinks, the reason for this is I have concatenated parts from the next two columns to make the file path, i.e. the folder and file name.

    I have made thousands of them, but some of the files are missing from the folders, is there a way to automatically test the hyperlinks to see if they link anywhere?

    I know this topic has been covered many times but as far as I can tell they are for hyperlinks which are made by inserting them and not the hyperlink formula.

    Any help would be greatly appreciated

    I'm using excel 2013 btw

  2. #2
    Registered User
    Join Date
    10-12-2015
    Location
    Bristol, UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Detect Broken Hyperlinks when Hyperlink formula is used

    Hi rossboland1,

    Are you using the 'Friendly Name' option in the Hyperlink() function? If not, and assuming you are explicitly showing the whole filepath, then the following sub should work (assuming hyperlinks in range A1:A10 and column D is empty and can receive the test results)

    Please Login or Register  to view this content.
    If you are using the 'Friendly Name' (which will mask the hyperlink string from the cell's value), as your formula seems to concatenate the next two columns, you could recreate this concatenation when setting strTest instead, eg.

    Please Login or Register  to view this content.
    If you need more help, please do post an example, as this suggestion is based on a few assumptions about how you have set up your data - although I do hope the method makes sense.

    Hope this helps.

  3. #3
    Registered User
    Join Date
    10-27-2015
    Location
    Dublin, Ireland
    MS-Off Ver
    2013
    Posts
    4

    Re: Detect Broken Hyperlinks when Hyperlink formula is used

    Hi underscoreBadger,
    Thanks for your reply, yes I am using a friendly name.
    I was able to get your example to work when I removed the friendly name but I was unclear about what to do for using a friendly name, where do I put that line in code?

    Here is an example of what I'm trying to do
    https://drive.google.com/file/d/0B_v...ew?usp=sharing

  4. #4
    Registered User
    Join Date
    10-27-2015
    Location
    Dublin, Ireland
    MS-Off Ver
    2013
    Posts
    4

    Re: Detect Broken Hyperlinks when Hyperlink formula is used

    Sorry I just realized that was a bad example
    This one is better

    https://drive.google.com/file/d/0B_v...ew?usp=sharing

  5. #5
    Registered User
    Join Date
    10-12-2015
    Location
    Bristol, UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: Detect Broken Hyperlinks when Hyperlink formula is used

    Hi rossboland1,

    Thank you for the link. In this case, I would suggest two solutions: one would be to add a column to your spreadsheet that simply lists the unmasked hyperlink, and then test that using the above routine. This extra column could then be hidden if you don't want it displayed.

    Alternatively, you could rewrite the line

    Please Login or Register  to view this content.
    as

    Please Login or Register  to view this content.
    This in effect re-creates your existing logic behind building the link, this time within the VBA.

    There are probably pros and cons to both (and someone may suggest a different solution). Please do let me know if you get this working okay for your data.

  6. #6
    Registered User
    Join Date
    10-27-2015
    Location
    Dublin, Ireland
    MS-Off Ver
    2013
    Posts
    4

    Re: Detect Broken Hyperlinks when Hyperlink formula is used

    Yes that worked perfectly
    Thank you, you have saved me so much time

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Checking for broken hyperlinks
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 06-22-2018, 02:46 PM
  2. Broken hyperlinks to files
    By biederboat in forum Excel General
    Replies: 8
    Last Post: 12-10-2014, 06:46 PM
  3. Worksheets with broken or no hyperlinks
    By Geoffreym in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-12-2014, 06:20 AM
  4. Detect whether hyperlink formula was clicked/followed
    By LeanAccountant in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-22-2014, 12:31 PM
  5. Broken Formula to Hyperlink longitude and latitude cells to google maps
    By Nola ADA in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2013, 09:48 AM
  6. Excel 2007 : Hide Broken Hyperlinks
    By mrbougles in forum Excel General
    Replies: 0
    Last Post: 03-11-2011, 06:57 AM
  7. Broken hyperlinks
    By Nigel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-16-2008, 05:34 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1