Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Deb
 
Posts: n/a
Default how do I change the data series an an excel graph

I have a series of graphs that have been created that now reflect 2002, 2003
& 2004 and now need to change to reflect 2003, 2004 & 2005 the quickest and
easiest way since there are over 300+ spreadsheet and each has three
indivdual graphs that need to be changed.
  #2   Report Post  
Jon Peltier
 
Posts: n/a
Default

Deb -

This one's a bit more intricate than your typical newsgroup question.
Here's how I'd go about it, in pseudocode.

First, it is all included within a set of nested loops:

For Each oWorkbook In Directory.Workbooks
For Each oWorksheet In oWorkbook.Worksheets
For Each oChartOb in oWorkSheet.ChartObjects
For Each oSeries in oChartOb.Chart.SeriesCollection

Then for each series, I'd use John Walkenbach's Chart Series Class
Module (http://j-walk.com) to find the actual range containing the X
values and the Y values. If each range is a column, I'd offset it by one
row; if each is a row, by one column.

I know I'm making this sound easy <g, but there are some tricky bits to
it. You'd like to use some kind of dialog to select the directory (or
directory tree) to search for workbooks, probably with FileSearch or
Dir. The chart series class is very nice, but still the interface
between your code and the class requires some testing to make sure it
won't crash, and you'd need some kind of checking to make sure the new X
range contains 2003 thru 2005.

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


Deb wrote:

I have a series of graphs that have been created that now reflect 2002, 2003
& 2004 and now need to change to reflect 2003, 2004 & 2005 the quickest and
easiest way since there are over 300+ spreadsheet and each has three
indivdual graphs that need to be changed.

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
Excel should have a quick and simple "change case" function like . NinaSvendsen Excel Worksheet Functions 1 January 28th 05 03:15 PM
pasting excel data in a powerpoint slide James Excel Discussion (Misc queries) 4 January 28th 05 02:23 PM
How do I plot Excel data on a floorplan? tod1west Excel Discussion (Misc queries) 1 January 28th 05 02:11 AM
copying data from Excel spreadsheet to another DavidB Excel Discussion (Misc queries) 1 January 10th 05 11:26 PM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


All times are GMT +1. The time now is 09:57 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"