Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
 
Posts: n/a
Default Same cell range on different sheet

I have a workbook with many sheets containing the same type of data.
The user has made charts on one sheet and would like to copy them to
all of the other sheets, and have each chart reference the same area of
data on the new sheet, i.e. it should reference, say, A1:B20 on
whatever sheet it's on.

Is there a way to access individual parts of the series source in VBA?
I can write a procedure to retrieve the xvalues and values for the
series, but I don't know how to separate out the sheet name from the
range/cells reference.

If this can be done by hand, he'll be just as happy to copy and paste
the set of charts to each worksheet & have it re-link to the same area
of the new sheet. Ideally there will be a final product where he can
tinker with charts on one page and spend less than 5 minutes either
clicking an "update all sheets" button or copying the entire set of
charts to every page. I would go for a macro, but it must be something
he doesn't need to worry about, otherwise he'd rather find the way to
copy & paste.

Thanks for any insight.

  #2   Report Post  
Posted to microsoft.public.excel.charting
 
Posts: n/a
Default Same cell range on different sheet

I found the function I needed on another site, thanks to Andy for his
posts there. The solution is Replace which searches a string for text
and replaces it with new text. I copied and pasted the charts then
searched the new chart formulas for the old sheet name & replaced it
with the new name. Here's the line I needed:

With Worksheets(sh).ChartObjects(i).Chart.SeriesCollect ion(1)
.Formula = Replace(.Formula, modelsheet, current)
End With


wrote:
I have a workbook with many sheets containing the same type of data.
The user has made charts on one sheet and would like to copy them to
all of the other sheets, and have each chart reference the same area of
data on the new sheet, i.e. it should reference, say, A1:B20 on
whatever sheet it's on.

Is there a way to access individual parts of the series source in VBA?
I can write a procedure to retrieve the xvalues and values for the
series, but I don't know how to separate out the sheet name from the
range/cells reference.

If this can be done by hand, he'll be just as happy to copy and paste
the set of charts to each worksheet & have it re-link to the same area
of the new sheet. Ideally there will be a final product where he can
tinker with charts on one page and spend less than 5 minutes either
clicking an "update all sheets" button or copying the entire set of
charts to every page. I would go for a macro, but it must be something
he doesn't need to worry about, otherwise he'd rather find the way to
copy & paste.

Thanks for any insight.


  #3   Report Post  
Posted to microsoft.public.excel.charting
Jon Peltier
 
Posts: n/a
Default Same cell range on different sheet

I wrote a utility to handle this:

http://peltiertech.com/Excel/Charts/ChgSrsFmla.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


wrote in message
oups.com...
I found the function I needed on another site, thanks to Andy for his
posts there. The solution is Replace which searches a string for text
and replaces it with new text. I copied and pasted the charts then
searched the new chart formulas for the old sheet name & replaced it
with the new name. Here's the line I needed:

With Worksheets(sh).ChartObjects(i).Chart.SeriesCollect ion(1)
.Formula = Replace(.Formula, modelsheet, current)
End With


wrote:
I have a workbook with many sheets containing the same type of data.
The user has made charts on one sheet and would like to copy them to
all of the other sheets, and have each chart reference the same area of
data on the new sheet, i.e. it should reference, say, A1:B20 on
whatever sheet it's on.

Is there a way to access individual parts of the series source in VBA?
I can write a procedure to retrieve the xvalues and values for the
series, but I don't know how to separate out the sheet name from the
range/cells reference.

If this can be done by hand, he'll be just as happy to copy and paste
the set of charts to each worksheet & have it re-link to the same area
of the new sheet. Ideally there will be a final product where he can
tinker with charts on one page and spend less than 5 minutes either
clicking an "update all sheets" button or copying the entire set of
charts to every page. I would go for a macro, but it must be something
he doesn't need to worry about, otherwise he'd rather find the way to
copy & paste.

Thanks for any insight.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF is updateing cells on another sheet with count from current sheet. John Excel Discussion (Misc queries) 3 March 20th 06 03:58 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Copy text from same cell on every sheet to title sheet? Jon Excel Discussion (Misc queries) 2 February 9th 05 03:11 PM


All times are GMT +1. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"