Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problems with If function
I have successfully used the following to create a dynamic link:
=HYPERLINK(INDIRECT("'" & $A$12 & "'" & "!" & "A2")) The problem is that if there is no value in the cell referenced for the dynamic link, it returns that annoying #ref! So, I thought I would be smart, and change it to: =IF(A12="","",HYPERLINK(INDIRECT("'" & $A$12 & "'" & "!" & "A2"))) This got of the #ref!, sure enough, but now, gives an error and says that the reference is invalid. Thoughts? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problems with If function
Linck Schlich was thinking very hard :
I have successfully used the following to create a dynamic link: =HYPERLINK(INDIRECT("'" & $A$12 & "'" & "!" & "A2")) The problem is that if there is no value in the cell referenced for the dynamic link, it returns that annoying #ref! So, I thought I would be smart, and change it to: =IF(A12="","",HYPERLINK(INDIRECT("'" & $A$12 & "'" & "!" & "A2"))) This got of the #ref!, sure enough, but now, gives an error and says that the reference is invalid. Thoughts? Try checking the INDIRECT function with ISERROR()... =IF(ISERROR(INDIRECT("'"&$A$12&"'!A2")),"",HYPERLI NK(INDIRECT("'"&$A$12&"'!A2"))) -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problems with If function
On Feb 11, 3:06*pm, GS wrote:
Linck Schlich was thinking very hard : I have successfully used the following to create a dynamic link: =HYPERLINK(INDIRECT("'" & $A$12 & "'" & "!" & "A2")) The problem is that if there is no value in the cell referenced for the dynamic link, it returns that annoying #ref! So, I thought I would be smart, and change it to: =IF(A12="","",HYPERLINK(INDIRECT("'" & $A$12 & "'" & "!" & "A2"))) This got of the #ref!, sure enough, but now, gives an error and says that the reference is invalid. Thoughts? Try checking the INDIRECT function with ISERROR()... =IF(ISERROR(INDIRECT("'"&$A$12&"'!A2")),"",HYPERLI NK(INDIRECT("'"&$A$12&"'! A2"))) -- Garry Free usenet access athttp://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc That worked beautifully!! Thank you so much. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problems with If function
After serious thinking Linck Schlich wrote :
On Feb 11, 3:06*pm, GS wrote: Linck Schlich was thinking very hard : I have successfully used the following to create a dynamic link: =HYPERLINK(INDIRECT("'" & $A$12 & "'" & "!" & "A2")) The problem is that if there is no value in the cell referenced for the dynamic link, it returns that annoying #ref! So, I thought I would be smart, and change it to: =IF(A12="","",HYPERLINK(INDIRECT("'" & $A$12 & "'" & "!" & "A2"))) This got of the #ref!, sure enough, but now, gives an error and says that the reference is invalid. Thoughts? Try checking the INDIRECT function with ISERROR()... =IF(ISERROR(INDIRECT("'"&$A$12&"'!A2")),"",HYPERLI NK(INDIRECT("'"&$A$12&"'! A2"))) -- Garry Free usenet access athttp://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc That worked beautifully!! Thank you so much. Great! Glad to be a help. I appreciate the feedback... -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF function problems | Excel Worksheet Functions | |||
If then Function Problems | Excel Worksheet Functions | |||
problems with if function | Excel Worksheet Functions | |||
Some function problems | Excel Worksheet Functions | |||
Function problems | New Users to Excel |