View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Phil
 
Posts: n/a
Default How to create hyperlink from 2 cells, then open Word

Hi Kevin,

I don't know either why they didn't work. I have a feeling that it might
require some kind of VBA event handler to make it work, but I'd be lying if I
said that wasn't just a guess.

I DO apprieciate your extra effort and am looking forward to hearing what
you have to say, when you get a chance to do so.

Phil.

"Kevin Vaughn" wrote:

I apologize for the complexity of the solution. Based on the other replies
to you (though I guess they didn't work for you, but I'm not sure why not)
you probably don't need such a complex solution. Unfortunately, I don't have
internet access except at work, and, as busy as I've been lately, I usually
can only pop in during lunch. And as it's past the time I am supposed to
leave, I can't attempt to answer you now. If I get time during lunch
tomorrow, and you still haven't got an answer that will work for you, I'll
try breaking it down a little more.
--
Kevin Vaughn


"Phil" wrote:

Hi Kevin,

In as much as I apprieciate your answer and its complexity, I was only able
to grasp about 10% of what you said. Sadly, I wish I could use what you've
provided me, but I wouldn't know where to begin (or end).

If you could steer me a little further with some more hints or suggestions,
I'd greatly apprieciate it!

Phil.

"Kevin Vaughn" wrote:

I have done something similar (but not exactly this) in one of my
spreadsheets. First, the formula I use (warning, it's long)

=IF(ISNA(LOOKUP(2,1/(1-ISBLANK(ColCount)))),"",HYPERLINK($B$1&LOOKUP(2,1/(1-ISBLANK(ColCount)),ColCount)&INDEX($B$2:$D$2,MATCH (LOOKUP(2,1/(1-ISBLANK(ColCount)),ColCount),ColCount,0)),LOOKUP(2 ,1/(1-ISBLANK(ColCount)),ColCount)))

One of the differences is instead of just dealing with .doc extensions, I
have .xls extensions and (just for the sake of having more than 2 types to
deal with) .mdb extension. I have these in seperate columns and I use a
dynamic named range to let me know how many columns I am dealing with. My
named range looks something like this (shouldn't it look exactly like this???)

=OFFSET(Links!$B9,,,1,COUNTA(Links!$2:$2))

The lookup part was something I adapted from previous posts on this forum
that was originally was intended to show the last value in a column (or row,
I can't remember) Mine just looks to see which of the 3 (or more) columns
is populated so that the formula will know which extension to use.

The UNC path I am using is in cell B1. The file extensions are in row 2.
And what is displayed in the cell is the filename (no path or extension.)

That seems to be the crux of it. Perhaps you can adapt it for your needs.

--
Kevin Vaughn


"Phil" wrote:

Hello,

The purpose of this endeavour is to create a cell that when the user clicks
on it, it will open up a Word file that THAT particular cell represents.

FIRST STEP:
Take the values from Column D (Tract Number), then add a ".doc" extension to
it, then put the UNC filepath (\\server\data\reports) in front of all of that
and put it in Column E. See me example below:

File path plus Tract Number plus Extension

\\server\data\reports\ 7-5-065-085 .doc

... to generate something like this:
\\server\data\reports\7-5-065-085.doc

SECOND STEP:
Use the value (only when the user clicks on the hyperlink) from the cell in
Column E and start up Word.

Can this be done?

Thanks in advance for all of your replies.

Phil.