Dynamic Charts

G

Guest

Hi All,
I have a set of embedded charts (linked to worksheet data). Typically these
might show the last 12 months of data, but it may be other fixed periods as
required.

How can I arrange for the chart ranges to dynamically change as new values
are added to next empty cell in the range? For example if I am displaying
the last 12 months say Jul06 thru Jun07, when I add a value for Jul07 the
chart changes to show Aug06 thru Jul07.

Currently we edit the chart ranges manually, which is both tedious and error
prone.

Prefer a Excel function solution but if VBA needed we can use it.

Many thanks
 
K

Ken

The OFFSET function is very useful in this effort. If you give the
data to be charted a defined name, and define the name using the
offset function you can do exactly what you want. For example (copied
from a dynamic chart of mine), if you have a range named "Actual",
defined as

=OFFSET(combined!$C$3,COUNTA(combined!$C:$C)-3,1)

where your data is in column C and you assign "Actual" to be the
values for your series, then your series will grow as the range
increases. In this case, I have 3 non-blank cells in column C that
are not part of the data, the the data starts in row 4; hence, I
offset from row 3 by the total number of non-blank cells in column C,
less 3. When assigning the named range to the values, you need to
include the sheet name.

Good luck.


Ken
Norfolk, Va
 
G

Guest

Thanks Ken , works great.


Ken said:
The OFFSET function is very useful in this effort. If you give the
data to be charted a defined name, and define the name using the
offset function you can do exactly what you want. For example (copied
from a dynamic chart of mine), if you have a range named "Actual",
defined as

=OFFSET(combined!$C$3,COUNTA(combined!$C:$C)-3,1)

where your data is in column C and you assign "Actual" to be the
values for your series, then your series will grow as the range
increases. In this case, I have 3 non-blank cells in column C that
are not part of the data, the the data starts in row 4; hence, I
offset from row 3 by the total number of non-blank cells in column C,
less 3. When assigning the named range to the values, you need to
include the sheet name.

Good luck.


Ken
Norfolk, Va
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top