Microsoft KB Archive/107752

= Microsoft Knowledge Base =

XL: Chart Number Format Not Updated If Data Source External
Last reviewed: March 27, 1997

Article ID: Q107752

5.00 5.00c 7.00| 5.00 5.00a

WINDOWS       | MACINTOSH kbusage kbtlc

The information in this article applies to:


 * Microsoft Excel for Windows, versions 5.0, 5.0c
 * Microsoft Excel for the Macintosh, versions 5.0, 5.0a
 * Microsoft Excel for Windows 95, version 7.0

SYMPTOMS
When you change the number format of the source data for a Microsoft Excel chart, the number format of the data in the chart is not updated if the following conditions are true:

- The source data is in another workbook

-and-

- The chart sheet is not the active sheet in its workbook

CAUSE
When you create a chart in one workbook that contains data from another workbook, the format of the chart data will be updated only when the chart sheet is active and the workbook that contains the source data is open.

WORKAROUND
To make sure that your chart data formats are updated when you change the format of the source data, do either of the following:

 Keep the source data worksheet and the chart in the same workbook. -or- Activate the chart window before you change the format of the source data.

Steps to Reproduce Behavior
  In a new workbook that contains at least two worksheets, in one of the worksheets, enter the following data: A1: 1  Select cell A1 and press F11 to create a chart that is a new sheet in the workbook.  Do the following to drag the sheet on which you entered the data to a new workbook: a. From the File menu, choose New to create a new workbook (Book2 in      this example). b. From the Window menu, choose Arrange, and under Arrange, select the Tiled option. c. Select the tab of the worksheet with the chart data and drag it to      the Book2 window. d. Save the new workbook as BOOK2.XLS.  In the first workbook, select the tab of another worksheet so that the chart sheet is not the active sheet. In the worksheet that you moved to BOOK2.XLS, select cell A1, and from the Format menu, choose Cells. Select the Number tab, and from the Category list, choose Percentage. From the Format Codes list, choose 0%, and choose OK.</li> In BOOK2.XLS, from the File menu, choose Close, and choose Yes to save the changes.</li> In the first workbook, select the chart sheet tab.</li></ol>

The numbers on the chart are still formatted with the General format and do not reflect the percentage format that you applied to the linked data in BOOK2.XLS.

NOTE: If the chart sheet is active in the first workbook at any time while BOOK2.XLS is open, the values on the chart have the same formatting as the linked data.