PDA

View Full Version : Hyperlink



rbv
02-03-2017, 03:57 AM
Dears,

Could you please help me?

I have excel file where i extract daly values from SQL. For each value is column F there is a "Batch number" in column Q.
For each "Batch number" I have to add in "column R" and hyperlink to connect to the pdf related to the "Batch number"
I am doing it manually, and it's time consuming in case we have many "batch numbers"

The batch number are for example : 775533 and the pdf ( which is saved on L: Drive ) have automatically the name "******x_"775533"_***xx".pdf. Where the "***xx" are text.

Ps: the batch number changed based on cell. ( it should be kind of vlookup) seach for batch number and catch the pdf.
( as per below)

batch Number Link
(column Q) ( column R)
line 1 - 775533 "***xx"775533"***x"
line 2 - 889922 "***xx"889922"***xx"
line 3 - 664411 "***xx"664411"***x"
.....
.....
Is there a away how we could do it automatically?

many thanks for your help

p45cal
02-03-2017, 10:48 AM
I can't make head or tail of what's in your columns.
Supply a sheet with some values in column Q and a few hyperlinks that you've added manually and correctly in column R.

JBeaucaire
02-07-2017, 09:00 AM
If you have all the pieces of text from which YOU can manually build the exact correct text string that would represent the hyperlink address, then I'd suggest you insert a HYPERLINK() formula in column R wherein you build that string once for the first row, then just copy down to create all the rest of the clickable hyperlinks.

For instance if the path where the PDF is C:\MyPDFs\ and the values you want to use were in F and Q, then for row 2 something like this can get you started, tweak as necessary to get the string correct:

=HYPERLINK("C:\MyPDFs\" & Q2 & "xx" & F2 & "x.pdf", "Link")

Again, I realize the part in red is probably not correct yet, it is meant to get you started building that concatenation until the string is correct. Then is should work for the rest of the rows as you copy down.