Microsoft KB Archive/123579

{|
 * width="100%"|

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

 * }

-

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.
 * A cell in the workbook contains a formula referring to the defined name.
 * 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.