View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.charting
Greg Wilson
 
Posts: n/a
Default extending source data in several charts

Oops,

This would require that all the charts have the same number of data points.
This is not likely the case here. So disregard my previous post.

Greg

"Greg Wilson" wrote:

Mike,

Your mention of the Offset function likely was in reference to previous
posts describing Dynamic Named Ranges. However, I'm not suggesting that your
father maintain these. I suggest that you set it up and hencefourth it should
be maintenance free so long as no new charts are added.

If your data ranges are all in some sensible order, after creating the first
named range, the others should be easy. Examples of range definitions:

Name : Definition in RefersTo window

Chart 1:
XVals1: =Offset(Sheet1!$A$1, 0, 0, Count(Sheet1!$A:$A), 1)
YVals1: =Offset(XVals1, 0, 1)

Chart 2:
XVals2: =Offset(XVals1, 0, 2)
YVals2: = Offset(XVals1, 0, 3)

Chart 3:
XVals3: =Offset(XVals1, 0, 4)
YVals3: = Offset(XVals1, 0, 5)

etc...

The macro route is another possibility. But I would use this as the first
option. For the macro route, I think I'd use the WorksheetChange event to
loop through all the ranges and reset the source data for all charts. A bit
slower than the first option.

Regards,
Greg


"Mike" wrote:

I have a big Excel doc with numerous charts, each with numerous lines.

About once per month, I need to extend the charts for about a month. This is
a very painful process for each graph (multiplied by numerous graphs!).

Does anyone have any simple method to do a mass change, standard or VBA?
This would be extremely helpful.

I also noticed some posts using OFFSET, but this would be too confusing for
my father (for whom I am doing this) and too cumbersome. Something like a
standard function or a VBA macro that I can program would make his life so
much easier.

Thanks much!