Microsoft Knowledge Base

XL5: GET.FORMULA Doesn't Return Series Formula After CLEAR(2)

Last reviewed: September 12, 1996
Article ID: Q118880
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, version 5.0

SYMPTOMS

In Microsoft Excel, if you use the CLEAR(2) function to clear the formatting on a chart, after you use the ECHO() function to keep the screen from updating, the GET.FORMULA() function does not return the series formula on a chart.

CAUSE

The GET.FORMULA function returns an empty string instead of a chart series formula if you use this function immediately after the CLEAR(2) function, while screen updating is turned off. This behavior occurs because when you use the ECHO(FALSE) function to turn off screen updating, and then use the CLEAR(2) function, the screen is prevented from updating and formatting the chart again. A formula string cannot be returned for the chart series unless the chart is formatted.

Note that this is not a problem in Microsoft Excel version 4.0.

WORKAROUND

To avoid this behavior when you use the GET.FORMULA() function with a chart series, turn screen updating on before you use the GET.FORMULA() function after using the CLEAR(2) function as in the following example:

Microsoft provides macro examples for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This macro is provided as is and Microsoft in no way guaranties that the following code can be used in all situations and will not support modifications of the code to suit specific customer requirements.

   =CLEAR(2)
   =ECHO(TRUE)
   =ECHO(FALSE)
   =GET.FORMULA("S1")

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

REFERENCES

For more information about CLEAR, choose the Search button in Microsoft Excel Macro Functions Help and type:

    CLEAR function


KBCategory: kbprg
KBSubcategory: kbmacro

Additional reference words: 5.00



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
©1997 Microsoft Corporation. All rights reserved. Legal Notices.