Solved

Excel Dynamic Graph Series

Posted on 2011-02-12
5
550 Views
Last Modified: 2012-05-11
I have an Excel Workbook with numerous graphs. An example of a graph series is below:
=SERIES("Gross Revenue with Fed Taxes",'2 Yr Rev with Taxes'!$C$67:$Z$67,'2 Yr Rev with Taxes'!$C$78:$O$78,1)

the $C$78:$O$78 above is the range for the graph where $O$78  is the end of the graph line for January and will need to be changed to $P$78 for February , and so on. I have been making this change manually and would greatly appreciate a way to have the reference automatically change based on a month number that is entered on a control sheet. Thanks in advance for any assistance.
0
Comment
Question by:mark-labarge
  • 3
  • 2
5 Comments
 
LVL 50

Expert Comment

by:teylyn
ID: 34881417
Hello,

Assuming your control sheet is called ControlSheet and the number for the number of months to display in the chart is in A1, create a range name called chtData, referencing the following formula:

=offset('2 Yr Rev with Taxes'!$C$78,0,0,1,ControlSheet!$A$1)

Then edit the chart series through the dialog box and enter this in the series values field

'2 Yr Rev with Taxes'!chtData

Alternatively, edit the chart series and change it to

=SERIES("Gross Revenue with Fed Taxes",'2 Yr Rev with Taxes'!$C$67:$Z$67,MyWorkbook.xls!chtData,1)

Change MyWorkbook.xls in the above to the name of your workbook.

For more information on dynamic charts, see the tutorials on Jon Peltier's site http://peltiertech.com/Excel/Charts/Dynamics.html

cheers, teylyn
0
 
LVL 50

Expert Comment

by:teylyn
ID: 34881429
see attached for a working example.

cheers, teylyn
myWorkbook.xls
0
 

Author Comment

by:mark-labarge
ID: 34887582
Thank you very much this is very helpful. I don't think I gave you enough information. I have 4, regional workbooks. Each workbook has 10 worksheets with a graph and each graph has several data series with data coming from different rows. The columns are always the same, with a starting point at C and and an ending point that  changes each month. In my series above that only thing that changes is the Z but each workbook might hve 40 or 50 different series
0
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
ID: 34891015
Hello,

you will need to create range names for each data series and plug them into the chart.

This is a bit of work to set up initially, but after that it will save a lot of time.

Whenever I have several series in a dynamic chart, and the source data is in several rows, but the same columns, I define one range name as the base range name and the other range names based on that range, using Offset()

For example

chtSeriesA refers to =offset('2 Yr Rev with Taxes'!$C$78,0,0,1,ControlSheet!$A$1)
chtSeriesB refers to =offset(chtSeriesA,2,0)
chtSeriesC refers to =offset(chtSeriesA,5,0)

chtSeriesA defines a range in row 78. chtSeriesB is two rows below that, chtSeriesC is 5 rows below chtSeriesA.

There are several ways to define the dynamic ranges, but in order to create dynamic charts, you will need dynamic range names for each chart series.

cheers, teylyn
0
 

Author Closing Comment

by:mark-labarge
ID: 34892619
Thank you very much. This will be a tremendous amount of work, but worth it in the long run.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now