Cell Value to look up a file name

N

newguy

I am not sure if this is possible but here is what I am trying to do.
I have word documents in a directory named corresponding to each
state. I want to be able to have the user in an excel document input
the State name and when the click a link it opens the corresponding
word document associated with the State that they put in. Again I
don't know if this is possible.

Thanks
 
S

Sheeloo

Assuming you have your sub-directories named after states (two letter
abbreviaiton) in the C:\States direcory and the document name is
'stateabbreviation.doc' like CA.doc, MD.doc etc

Then suppose the user enter state abbreviation in A1, you can have this in B1
=HYPERLINK("C:\States\"&A1&"\"&A1&".doc","Enter the State code in A1 and
click here")
 
N

newguy

That works perfect thank you. I had one more question and do you know
if there is a way to strip of leading and trailing blank spaces. My
concern is that if someone was to put a space then the state
abbreviation or a space after the abbreviation it breaks the link.
 
Top