ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Chart Relative To Worksheet When Copying- Excel 2007 (https://www.excelbanter.com/charts-charting-excel/254178-chart-relative-worksheet-when-copying-excel-2007-a.html)

grace

Chart Relative To Worksheet When Copying- Excel 2007
 
I'm looking for a technique to make charts automatically reference data on
the current worksheet when I copy a worksheet containing a chart. In Excel
2007, the chart references the cells from the original worksheet while Excel
2003 would automatically update the reference. I can manually key in the new
worksheet as the reference but this is tedious.

any suggestions?

Héctor Miguel

Chart Relative To Worksheet When Copying- Excel 2007
 
hi, Grace !

I'm looking for a technique to make charts automatically reference data on the current worksheet
when I copy a worksheet containing a chart.
In Excel 2007, the chart references the cells from the original worksheet
while Excel 2003 would automatically update the reference.
I can manually key in the new worksheet as the reference but this is tedious.

any suggestions?


I couldn't repro (xl-2007) copying ws w/embedded chart, source data remains referencing to original ws (?)
(copied ws automatically updates the embedded chart source data to it's "new" location/ws)

perhaps with a little help from vba (?) i.e.

With ActiveSheet
.ChartObjects(1).Chart.SetSourceData _
Source:=.Range("a1:b1,a3:b5,a7:b9,a11:b13,a15:b17" ), PlotBy:=xlByColumns
End With

hth,
hector.




All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com