Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF function problems mmcap Excel Worksheet Functions 9 December 3rd 08 04:02 AM
If then Function Problems MJ Excel Worksheet Functions 5 March 7th 08 09:06 PM
problems with if function Novice Excel Worksheet Functions 6 December 1st 06 01:05 PM
Some function problems timmyc Excel Worksheet Functions 1 February 7th 06 06:05 PM
Function problems SPCjcMIARNG New Users to Excel 6 November 3rd 05 04:22 PM


All times are GMT +1. The time now is 04:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"