Copying Chart with Chart Series from Worksheet Name

J

Joel Mills

I'm using Excel 2000. And have created an application that retrieves data
from an export and creates several charts. Now that I have several users
testing it they want to be able to copy a worksheet containing a chart into
the same workbook. When they perform sheet move or copy and copy the sheet
into the same workbook the data series isn't copied correctly. After
answering yes to the message box that informs them that they names already
exist the chart is copied. Inspection of the names at the worksheet levels
proves to be correct, but the data series isn't copied as expected. See
Below: The first series from the original chart. The second series from
the copied Chart.

=SERIES(Curve!TARGETEARLY,Curve!Week_Ending,Curve!PercentEarly,1)

=SERIES("Target Early %
Complete",{38359,38390,38418,38449,38479,38510,38540,38571,38602,38632,38663,38693,38724,38755,38783,38814,38844,38875,38905,38936,38967,38997,39028},{0,0,0,0,0,0,0.00116280610622283,0.0393778111795975,0.135734068089231,0.211814337205252,0.294477688509942,0.406082938316851,0.512269331828989,0.607771349820539,0.747642205933577,0.876835785464403,0.980649240508246,1,1,1,1,1,1},1)

Joel Mills
 
J

Joel Mills

I offer as further explanation. The data for the embedded charts reside on
the same sheet as the chart. As a test when I changed the location of the
original chart from the Worksheet, to a Chart Sheet, the same thing occurs
to the data series. I would expect some kind of problem moving the chart
from the worksheet because the names are at the worksheet level not the at
workbook level. But I don't know why doing a worksheet copy would have the
same results on my source data as changing the location from the worksheet
to a Chart sheet. Looking at the defined names shows that they are copied
to the new worksheet at the worksheet level correctly.
 
J

Joel Mills

Upon further inspection I discovered that the source data wasn't copied
over. By selecting the original chart and the doing a copy Ctrl+C and then
going to the copied chart and pasting the source data Ctrl+V this corrected
the data series. I would have thought copying the sheet with the embedded
chart would have brought over the charts source data as well and renamed the
range to the new worksheet name. It may have something to do with the fact
that the worksheet name was Curve (2) and has a space in the worksheet name.
When I changed the sheet name to "New" and copied the Datasource and
replaced "Curve!" with "New!" my chart series were correct.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top