Hyperlink to search PDF files

Rob Surina

New Member
Joined
Feb 14, 2016
Messages
8
I have a an Excel Worksheet that provides a part number in a cell (Cell A10 Example: 5 S1 F1 F1 E3 W1)

And, I have a File Folder G:\PDF\ that has hundreds of .pdf drawings with similar part numbers.

I'm looking to Hyperlink the Excel worksheet part number 5 S1 F1 F1 E3 W1 in cell A10 and link the same part number (5 S1 F1 F1 E3 W1) from the file folder G:\PDF

is this possible?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Additional Information:
The Excel Worksheet generates user defined part numbers in Cell A10
(Example: 5 S1 F1 F1 E3 W1 or 6 S1 F2 F2 E4 W2 or 7 S3 F2 F2 E4 W1....etc)
There are hundreds of possibilities to create these similar part numbers.

Additionally, I have a File Folder
G:\PDF\ that has hundreds of .pdf drawings with these same part numbers.

I'm looking to Hyperlink the Worksheet part number to the drawing.

Thank You!



<strike></strike>
 
Upvote 0
this hopefully shows you how to do it , I have just done it for A10 and put the link in B10, presumably you need to do it in a loop
Code:
Sub hyp()

Dim Filenm As String


Pathnm = "G:\PDF\"
Filenm = Cells(10, 1) & ".PDF"
newf = Pathnm & Filenm
      With Worksheets("Sheet1")
      .Hyperlinks.Add Anchor:=.Range(Cells(10, 2), Cells(10, 2)), _
                        Address:=newf, _
                        TextToDisplay:=newf
      End With






End Sub
 
Upvote 0
Hello offthelip,

Is it possible to do something like this as well?

=HYPERLINK("G:\PDF"&A10&".pdf",A10&".pdf")

Unfortunately, this doesn't work...

Rob
 
Upvote 0
I assume you mean this code doesn't work:
=HYPERLINK("G:\PDF"&A10&".pdf",A10&".pdf")
which it certainly won't , it has so many errors in it it isn't worht starting to correct it.
The code I gave you should work for the single example you gave us. What are really trying to do? I did say I presume you need a loop?
 
Upvote 0
Hello offthelip,

I've put together a sample worksheet and separate PDF folder to better explain the intended goal.
Is it possible to send you these items as an attachment?


Rob
 
Upvote 0
I realised after my last comment that you were using a FORMULA not VBA code, so my comment about the errors is completely wrong. I thin all you need to do to correct your formaul is add in a backslash:
Code:
[COLOR=#333333][I]=HYPERLINK("G:\PDF[/I][/COLOR][COLOR=#ff0000][I]\[/I][/COLOR][COLOR=#333333][I]"&A10&".pdf",A10&".pdf")[/I][/COLOR]
 
Upvote 0
Dear offthelip,

Thank you for the help.

The Hyperlink change you suggested WORKED!

I can't believe one backslash created such a problem.

You gotta love Excel..

Rob
 
Upvote 0

Forum statistics

Threads
1,223,732
Messages
6,174,182
Members
452,550
Latest member
southernsquid2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top