+ Reply to Thread
Results 1 to 7 of 7

Identify bad hyperlinks to PDF docs from Excel

Hybrid View

  1. #1
    Registered User
    Join Date
    05-01-2014
    Location
    ok
    MS-Off Ver
    Excel 2010
    Posts
    10

    Identify bad hyperlinks to PDF docs from Excel

    I have 1490 hyperlinks in Excel that I need to identify as either being good or bad. These are all hyperlinks to PDF documents. An example of the file name is "C:\Users\Jennifer\Docs\Lease\12345-Lease.pdf". There are 1490 rows with this type of data in one column. Then in another column I have "=HYPERLINK(C4,"LEASE"). I would like to be able to highlight the bad hyperlinks in yellow. I assume a macro is the way to go but I can't figure it out....

    Thanks!

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Identify bad hyperlinks to PDF docs from Excel

    What do you mean by 'bad hyperlinks'
    I am assuming you mean invalid or non existent.
    You will probably have to add a macro to check if the folder and filename exist, something like that.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    05-01-2014
    Location
    ok
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Identify bad hyperlinks to PDF docs from Excel

    Yes - sorry for the confusion. When I click on the hyperlink I sometimes get an error message "Cannot open the specified file." So, you are correct in that I need to be able to check if the filename exists and then highlight the ones that do not.

  4. #4
    Registered User
    Join Date
    05-01-2014
    Location
    ok
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Identify bad hyperlinks to PDF docs from Excel

    please see comment below - I responded incorrectly.

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Identify bad hyperlinks to PDF docs from Excel

    I would write a user defined function (a macro that returns a value or a true/false and us a right-click event that checks if the file exists, if it's incorrect then do nothing thus avoiding the error.

  6. #6
    Registered User
    Join Date
    05-01-2014
    Location
    ok
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Identify bad hyperlinks to PDF docs from Excel

    thank you but wouldn't i have to right click on every file name? i have 1,400 file names.

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Identify bad hyperlinks to PDF docs from Excel

    You can add the UDF (User Defined Function) to a worksheet event, like worksheet_Activate and have the macro run and color the background red if it's incorrect.
    You can also use the UDF in a conditional format rule to change the color if the result is invalid, There are many roads the lead to Rome.
    It's bedtime her, I'm going off-line, but post and ask. I'll read it tomorrow

+ 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] Excel VBA code that creates hyperlinks to external docs identified by the info in column A
    By crnadeau4 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-21-2013, 06:52 PM
  2. Hyperlinks to pdf docs that move with the excel doc and don't break
    By Dopey1956 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-19-2012, 02:17 PM
  3. Excel 2007 : How to merge 2 excel docs into multiple docs
    By T Johnson in forum Excel General
    Replies: 1
    Last Post: 06-06-2012, 12:09 PM
  4. Generating a list of Hyperlinks pointing to docs on a fileshare
    By Toomay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2009, 08:30 PM
  5. Replies: 0
    Last Post: 06-02-2005, 11:05 AM
  6. [SOLVED] problems with hyperlinks to Xcel docs
    By Phil in forum Excel General
    Replies: 0
    Last Post: 06-02-2005, 11:05 AM
  7. [SOLVED] Embedding Word Docs into Excel Worksheets and Then Printing The Word Docs
    By mr_melvis in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-07-2005, 10:06 PM
  8. [SOLVED] converting excel docs to word docs
    By rolercster in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-04-2005, 04:06 PM

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