Cell Value to look up a file name

  • Thread starter Thread starter newguy
  • Start date Start date
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
 
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")
 
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.
 
=TRIM(A1) to trim spaces in A1. Do test it out to see how it works...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top