GP Fault When Using INDIRECT in a Formula for a Defined Name

Last reviewed: September 12, 1996
Article ID: Q123579
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0

SYMPTOMS

In Microsoft Excel, when ALL of the conditions listed in the "Cause" section of this article are true, you may receive the following general protection (GP) fault:

     Excel caused a General Protection Fault in module EXCEL.EXE at
     00EE:22CA.

CAUSE

This error will occur if ALL of the following conditions are true:

  • A defined name in the workbook has a formula using the INDIRECT function.

    -and-

  • A cell in the workbook contains a formula referring to the defined name.

    -and-

  • The defined name used in the worksheet formula is prefaced with the worksheet name.

For example, assume you have a name "test" defined on a worksheet (Sheet1), and assume that it has the formula =INDIRECT($A$1). If you then refer to that defined name with the formula =Sheet1!test, in a cell in the workbook, a GP fault will occur. This behavior is incorrect. Under these circumstances, Microsoft Excel should return the #REF! error value because the reference to the globally defined name is invalid.

WORKAROUND

To refer to the defined name, define the name as a local sheet name (Sheet1!test) instead of as a global book name (test). Once you do this, the reference to the name will be valid.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Excel version 5.0 for Windows. This problem was corrected in Microsoft Excel version 5.0c for Windows.

REFERENCES

For more information on creating names, choose the Search button in Help and type either of the following:

   names, creating

   -or-

   names, overview


KBCategory: kbusage kbprb
KBSubcategory:

Additional reference words: 5.00 5.0a link gpf xlwin



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: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.