+ Reply to Thread
Results 1 to 14 of 14

Batch Hyperlinking from Outside Folder

  1. #1
    Registered User
    Join Date
    06-18-2010
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    59

    Post Batch Hyperlinking from Outside Folder

    Just hoping to get some help with this problem I am having in excel 2007.

    I have an excel file with close to 2,000 part numbers of which i would like batch hyperlink them their corresponding pictures in a folder of 1,000 pictuers. One thing to note, the picture file name and the part number are the exact same format.

    I would like to somehow automate a process of searching through these pictures for a match to the excel file and if there is a match, make a hyperlink of that part number that when clicked on, will pop up with the picture of the part.

    Thanks,
    Any help would be greatly appreciated.
    Last edited by vargs; 06-22-2010 at 08:28 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: Batch Hyperlinking from Outside Folder

    Like so...put this hyperlink formula in column A with your part numbers in column B, your folder path in H2 and your picture extension in G2:

    =HYPERLINK($H$2 & B2 & $G$2, "Link")
    Attached Files Attached Files
    Last edited by JBeaucaire; 06-18-2010 at 06:17 PM.
    _________________
    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
    06-18-2010
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Batch Hyperlinking from Outside Folder

    thanks so much for the help i will give it a shot by Monday afternoon and let you know if it works

  4. #4
    Registered User
    Join Date
    06-18-2010
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Batch Hyperlinking from Outside Folder

    I applied your spreadsheet with my own values and could not get the picture in cell column B to appear upon being clicked on

    The only thing that would happen when i would open it is the folder itself with the pictures in it
    I wanted to see if it would actually search for that picture name and make a link to the actual picture so that when you click the link you see the photo image not just the file in a folder.

    thanks
    Attached Files Attached Files
    Last edited by vargs; 06-20-2010 at 10:39 AM.

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

    Re: Batch Hyperlinking from Outside Folder

    I know it seems wrong, but the problem is the [ ] brackets you placed around your path. You should trust the example I gave you works because I wouldn't post it unless I'd already tested it.

    Match your example to mine in row 2, we are creating a windows link, not an Excel link. Just try it. The syntax I showed creates links that opens your default picture viewer and displays the picture if it's in the exact location created by the text strings. For you example, the result need to be:

    C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\1000550719.jpg

    So in H7, not only do you need to remove the [ ] brackets, you need to put the \ back at the end.

  6. #6
    Registered User
    Join Date
    06-18-2010
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Batch Hyperlinking from Outside Folder

    I am sorry,

    I never meant to insult your post by changing your coding. The only reason I changed it was because it was not working for me when i did exactly as you had specified as in the following attachment.

    I got the error "cannot open the specified file" when i first attempted it and then i tried to make some progress to show you that i was trying to fix the problem. I am sorry that it came off the wrong way.

    Anyway, please let me know what i should change to my attached file

    Thanks
    Attached Files Attached Files

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

    Re: Batch Hyperlinking from Outside Folder

    This is all on you now. I've shown the exact proper syntax. The only thing that would keep this from working for you is a misspelling.

    Make sure you try this with more than one file name and possibly more than one path. This does work exactly as shown. You need only verify the path is correct and the filename is spelled exactly right. There are no secrets to this beyond that.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-18-2010
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    59

    Smile Re: Batch Hyperlinking from Outside Folder

    It worked when i tried it this third time. I tried a different filepath and it worked!

    Thank you so much for your help, I greatly appreciate it.

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

    Re: Batch Hyperlinking from Outside Folder

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

  10. #10
    Registered User
    Join Date
    06-18-2010
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    59

    Post Re: Batch Hyperlinking from Outside Folder

    Sorry to bother you but I have one more question, is there a way to set up an addition to this formula.
    I would like it to insert the link if the file has a matching picture and output no link or say "no picture" if the part number in the excel file has no matching picture in the directory.

    thanks

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

    Re: Batch Hyperlinking from Outside Folder

    There are no builtin Excel functions to complete that test for you. I've been trying to keep you from needing VBA at all, accomplish your linking using simple formulas.

    The only way to "test" the links is to use VBA and change the cell results permanently if the file doesn't exist:
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    06-18-2010
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    59

    Thumbs up Re: Batch Hyperlinking from Outside Folder

    Great! The VBA code worked perfectly.

    I appreciate all the hard work you have put into helping me.

    I cannot thank you enough!

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

    Re: Batch Hyperlinking from Outside Folder

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

  14. #14
    Registered User
    Join Date
    07-03-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    1

    Re: Batch Hyperlinking from Outside Folder

    Quote Originally Posted by JBeaucaire View Post
    Like so...put this hyperlink formula in column A with your part numbers in column B, your folder path in H2 and your picture extension in G2:

    =HYPERLINK($H$2 & B2 & $G$2, "Link")
    Thanks a ton!! I worked and save my time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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