XL5: GP Fault or Strange Results Using CHOOSE Function

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

SYMPTOMS

In Microsoft Excel, when you use the CHOOSE function, if the first value argument contains an operator, such as the plus sign (+), one or more of the following symptoms occur:

  • The #NAME? error value is returned, formatted with a different color font.
  • The formula bar contains a lot of extended characters.
  • The screen elements, such as the column and row headings change colors.
  • The #VALUE! error value is returned.
  • You receive the "Cannot Resolve Circular References" error message.
  • You receive a general protection (GP) fault.

CAUSE

This problem occurs if the first value argument in the CHOOSE function contains an operator, such as the plus sign (+), and you include a space between the index_num argument, and this first value argument.

For example, when you enter the following formula on a MS Excel 4.0 macro sheet, you receive a GP fault:

   =CHOOSE(1, 2+3)

Note that there is a space following the comma.

If you enter the above formula on a worksheet, the #VALUE! error value is returned, and the formula bar contains extended characters. Additionally, when you exit Microsoft Excel, you may receive a GP fault.

This behavior also occurs if you use a defined name in the formula, as in the following example

   =CHOOSE(i, i+1)

WORKAROUNDS

To avoid receiving a GP fault when you use the CHOOSE function, do the following:

  • Do not include a space between the index_num argument and the first value argument, as in the following example:

          =CHOOSE(1,2+3)
    

    -or-

  • Use parentheses around the first value argument if it contains an operator as in the following example:

          =CHOOSE(1, (2+3))
    

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel version 5.0c for Windows.

REFERENCES

For more information about CHOOSE, choose the Search button in Help and type:

    CHOOSE function


KBCategory: kbother
KBSubcategory:

Additional reference words: 5.00 gpf garbage 004F:2FC8 module excel.exe



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.