+ Reply to Thread
Results 1 to 9 of 9

Auto hyperlink to files???

  1. #1
    Registered User
    Join Date
    07-20-2011
    Location
    Nis, Serbia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Question Auto hyperlink to files???

    Hi everybody!
    I am new here and I searched the forum but did not find a solution...

    I am creating list of completed tasks in a workshop (about 1000 of them) and i need to link every part number to a drawing in jpg format on my HD.

    So I was thinking, is it possible when you type the part number in cell to be automatically linked to file with the same name?

    Thanks!
    Regards from Serbia!
    Last edited by mickey331; 07-21-2011 at 02:52 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto hyperlink to files???

    Sure!

    Assuming the path is always the same and just part number of the pic is the variable, assuming the cell you are typing a part number in is A2, then this formula in B2 will present a hyperlink construction:

    =HYPERLINK("C:\2010\Pics\" & A2 & ".gif", "Link to: " & A2)

    Or this:

    =IF(A2="", "", HYPERLINK("C:\2010\Pics\" & A2 & ".gif", "Link to: " & A2))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-20-2011
    Location
    Nis, Serbia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Auto hyperlink to files???

    Thanks!!! It works perfect!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto hyperlink to files???

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  5. #5
    Registered User
    Join Date
    07-20-2011
    Location
    Nis, Serbia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Auto hyperlink to files???

    Problem is solved, but it would be even better if excel could recognize if there is a file in my folder. And if I don't have a file with that name to leave an empty cell (I mean without "link: image name"). There are some parts in my list that I don't have pictures for, and it looks confusing

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Auto hyperlink to files???

    That's why I gave you the second version of the formula above. Leave the first cell blank when there's no image and the formula will leave a blank cell.

  7. #7
    Registered User
    Join Date
    07-20-2011
    Location
    Nis, Serbia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Auto hyperlink to files???

    I understend that, but first cell is full (allways, every part has his number) but every number doesn't have image that need to be linked. So it shows in second cell "Linked to: image name" but there is no image in folder. It allways shows link even if image doesn't exist.

  8. #8
    Registered User
    Join Date
    08-09-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Auto hyperlink to files???

    Did you ever get this solved? I have the same issue and cannot figure it out.
    Thanks

  9. #9
    Registered User
    Join Date
    07-20-2011
    Location
    Nis, Serbia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Auto hyperlink to files???

    Tried to solve it with VB but I gave up and used solution that JBeaucaire gave me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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