Impossible - Dynamic Legends?

L

LiAD

Hi,

I have a table of 23 rows (products) and 30 columns (date) which plots sales
of different items against the date against which they were sold. Not all
products are sold every month. Using macros I can create the table that will
summarise the sales per day in a particular month for any items that were
sold, deleting all empty days and product lines. So my table can be anywhere
from a 1x23 to a 23x30. I would like to create a dynamic chart that will
plot the date on x-axis against the sales per day on the y-axis WITH THE
LEGEND SHOWING WHICH PRODUCTS WERE MANUFACTURED. As the chart depends on the
table my graph can have 1 to 23 lines on it, with 1 to 23 items in the
legend. My table starts in cell AP5.

How can I create such a dynamic chart and legend?

Thanks
 
K

ker_01

The only way I've figured out how to do this is to create your dynamic named
range (using offsets) for the whole 2D range as one name. When you assign
that range to the data source of your graph (at least in Excel 2003), it is
converted to a static range, so put a hook in your code to reassign that
named range as the graph source range every time you run your code to change
the size of your data range. (note: this is the overall range, not individual
series ranges)

HTH,
Keith
 
L

LiAD

Maybe the easiest way is just to make a code to plot the graph?

Is there a code that I could use that would say look at cols A1 to G40 or
whatever, take any columns that have 1 or more values in it and plot a graph
of these with the title as......, axis formats as....... etc etc?
 

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