Microsoft KB Archive/120408

{|
 * width="100%"|

XL5: GP Fault or Strange Results Using CHOOSE Function

 * }

-

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)   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.