ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Hyperlink function in an If function (https://www.excelbanter.com/excel-worksheet-functions/193158-hyperlink-function-if-function.html)

GoBow777

Hyperlink function in an If function
 
Hello:

I'm using Excel 2003, and what I'm trying to do is use the HYPERLINK function in an IF statement so that if the value is TRUE then the HYPERLINK is active and if the value is FALSE then the HYPERLINK would be inactive. Does any one know of a way to make this work without getting the error message, "Cannot open the specified file.".

Matt

Pete_UK

Hyperlink function in an If function
 
I put this formula in B8 as a test:

=IF(A8="","",HYPERLINK("#A4","jump"))

If A8 is empty then B8 appears empty, and you can click on that cell
and stay there. But, if you put something in A8 then the word "jump"
appears in B8 and if you click on that cell now the cursor will jump
to A4. Is this the kind of thing you wanted?

Hope this helps.

Pete

On Jun 30, 10:13*pm, GoBow777
wrote:
Hello:

I'm using Excel 2003, and what I'm trying to do is use the HYPERLINK
function in an IF statement so that if the value is TRUE then the
HYPERLINK is active and if the value is FALSE then the HYPERLINK would
be inactive. Does any one know of a way to make this work without
getting the error message, "Cannot open the specified file.".

Matt

--
GoBow777



GoBow777

Thanks Pete! That works just fine.

Matt

Quote:

Originally Posted by Pete_UK (Post 687659)
I put this formula in B8 as a test:

=IF(A8="","",HYPERLINK("#A4","jump"))

If A8 is empty then B8 appears empty, and you can click on that cell
and stay there. But, if you put something in A8 then the word "jump"
appears in B8 and if you click on that cell now the cursor will jump
to A4. Is this the kind of thing you wanted?

Hope this helps.

Pete

On Jun 30, 10:13*pm, GoBow777
wrote:
Hello:

I'm using Excel 2003, and what I'm trying to do is use the HYPERLINK
function in an IF statement so that if the value is TRUE then the
HYPERLINK is active and if the value is FALSE then the HYPERLINK would
be inactive. Does any one know of a way to make this work without
getting the error message, "Cannot open the specified file.".

Matt

--
GoBow777


Pete_UK

Hyperlink function in an If function
 
You're welcome, Matt - thanks for feeding back.

Pete

On Jul 1, 10:43*pm, GoBow777 wrote:
Thanks Pete! That works just fine.

Matt


Rebelfish

Now what if I wanted some text that wasn't a hyperlink to appear if false. For example: IF(a4="G",Hyperlink("http://google.com","Google"),"No Link")

What is strange is that once there's the hyperlink function in there, even if that condition is not chose, the cell is formatted as a hyperlink.

Thanks!

PS -- the function is more complicated than above; I just simplified it down to the most basic components relevant to the issue at hand


All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com