XL5: GP Fault or Strange Results Using CHOOSE Function

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

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

Keywords :
Version : 5.00
Platform : WINDOWS
Issue type :


Last Reviewed: September 15, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.