Inserting A Hyperlink Automatically

S

Steve Mulhall

Hi all,

Does anyone know how I insert a hyperlink into a cell based
on a value in another cell?

i.e. How can I incorporate the =HYPERLINK worksheet
function with an =IF statement.

The logic is, if cell A1 = "some value" then B1 = "some
hyperlink" otherwise leave B1 blank. I know part of the
logic and syntax for this would be something along the
lines of having the following formula in cell B1 (where I
want the hyperlink insertted:

=IF(A1="Something", "HYPERLINK", "")

But if I subsitute the word "HYPERLINK" with an actual
hperlink e.g. http://www.microsoft.com then the text is
displayed correctly but only as text, not as an actual
hyperlink and I can find no way to incorporate the correct
=HYPERLINK worksheet function into the above =IF statement
(which I guess is what I need to do). I've tried:

=IF(A1="Something", (=HYPERLINK("http://www.microsoft.com",
"Text To Display"), ""))

and any number of permutations of this but to no avail

Any help greatly appreciated.

Many thanks
 
S

Steve Mulhall

Brilliant. I'd like to say I tried that because I did
claim to have tried any number of permutations of the
formula, but clearly I didn't try that one as it worked a
treat. It's probably the only one I didn't try ;-)

many thanks
 

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

Top