Question Locked

Auto Create an hyperlink in a excel cell

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I would like to create an excel document with a column of hyperlink cells. Is it possible to have the address of each link updating itself automatically depending on the content of cell in the corresponding row?

ei:

Col A/ Col B/ Col C
------------------------
Row A / X / Y / <..."C/.../My Folder/"XY>
Row B / Z / W / <..."C/.../My Folder/"ZW>
Row C / Y / T / <..."C/.../My Folder/"YT>
: : : :
: : : :

where all the fields in Column C are hyperlinks.

I hope that my question is clear enough and that someone outhere will be able to give me some help.

Thanks in advance,

5 replies

by frederic_place

Peconet,
Thanks for the link, I had a look at it but unfortunately it doesn't answer my question; the link show me how to disable the hyperlink function when you enter an Url in a cell.

I can try to rephrase my post, the ideal application I would like to create is as follow:
If I have a PDF purchase order saved as "PO 1956" on my hard drive, I would like to open that file by clicking a cell in Excel.
Now, I know I can edit the cell manually by right clickinging the Cell->Hyperlink...->Insert hyperlink and then Browse the path and type in the text to display. I have now the cell showing "1956" which open the PO 1956 when I click on it, unfortunately this is a very long process.

Would it be possible to create a sheet with a code or function that allow the user to enter a document number in a cell and this cell would directly link to the corresponding document?
Or it might just be easier to create a cell with a function that create a link to the hard drive with a document number entered in the same row. I would have two cells instead of one (the doc number and the doc Hyperlink) as shown in my first post.

I hope this sounds a little bit clearer and not to tedious,
I am looking forward to hear what are your thoughts on the matter.

by Former member

The link to it was:
"The VBA code is taken directly from the Microsoft Knowledge Base, Article 291209".

Here you are: :)
http://support.microsoft.com/default.aspx?scid=kb;en-us;291209

Please READ very carefully and you will find. :)

Please post back if you have any more problems or questions.
If this information is useful, please mark as helpful. Thanks.

by frederic_place

I found a solution:

------Col A / Col B / Col C
Row 1/ File 1 / Folder 1 / "Auto hyperlink"
Row 2/ File 2 / Folder 2 / "Auto hyperlink"
Row 3/ File 3 / ...........................
:::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::

I am using the HYPERLINK function to put in column C cells,

HYPERLINK("C:\Location\"&A1&"\"&B1&".pdf")

Assuming the files that have to be open are pdf. There might be easier way to do this with code but I don't know VBA that well.

Thanks anyway,
Regards,

This discussion is closed to new replies.