XL97: HYPERLINK Doesn't Work if Second Argument Returns Error

Last reviewed: January 15, 1998
Article ID: Q158330
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

When you click a hyperlink in a Microsoft Excel worksheet, nothing happens.

CAUSE

This will occur if both of the following conditions are true:

  • The hyperlink was created by a formula containing the HYPERLINK worksheet function.

        -and-
    
  • The second argument of the HYPERLINK function, friendly_name, equals an error value, such as #DIV/0!, #NAME?, or #VALUE!

WORKAROUND

To prevent this problem from occurring, make sure that your HYPERLINK worksheet function does not contain an error value for the second argument.

For example, if your formula is

   =HYPERLINK("http://msnbc.com",A1/B1)

Since the expression A1/B1 can return an error value of #DIV/0! if B1 is zero, you need to change the second argument so that it won't return an error value. For example:

   =HYPERLINK("http://msnbc.com",IF(B1=0,0,A1/B1))

After you do this, the hyperlink should work correctly.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

In Microsoft Excel 97, the HYPERLINK worksheet function allows you to create a hyperlink within a worksheet cell. The HYPERLINK function accepts two arguments:

   Argument        Description
   -------------------------------------------------------------------

   link_location   the path and file name, or URL, you want to link to
   friendly_name   the text that should appear in the cell

The friendly_name argument can be a text string, a defined name, or any other expression that returns a value.

If the value of the friendly_name argument returns an error value, the hyperlink will not work when you click it. Here are some example formulas that demonstrate this problem.

Example 1: #VALUE! error

This hyperlink will fail because the expression 1+"Alpha" returns a #VALUE! error:

   =HYPERLINK("http://msnbc.com",1+"Alpha")

Example 2: #NAME? error

This hyperlink will fail if the defined name "Bravo" doesn't exist, because it results in a #NAME? error:

   =HYPERLINK("http://msnbc.com",Bravo)

Example 3: #DIV/0! error

This hyperlink will fail if the mathematical expression returns any type of error, such as #DIV/0!:

   =HYPERLINK("http://msnbc.com",A1/B1)


Additional query words: 8.00 XL97
Keywords : xlformula xlweb
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.