View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.charting
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Stopping a chart when the data runs out

You could do it with a dynamic named range. The trick is using the proper
syntax when inputting it into the chart wizard.

An example of a chart using dynamic range:
http://peltiertech.com/Excel/Charts/...umnChart1.html

Another idea, but not sure if it will work in your situation, would be to
try and get the cells that you don't want to chart to return NA() instead of
"". XL charts will ignore #NA values typically.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Tim" wrote:

Using Excel 2007, I have a chart set up to display based on a table.
However, the table will have a variable number of entries. The way I
have the data defined now includes the whole table which has a maximum
of 25 entries. So if there are only 20 entries, the last 5 default to
"", or for practical purposes, 0.

If the rest of the table values are in the 70's, and the chart is a
control chart, that makes the chart "taller" than it needs to be, and
hard to read the part of the chart that contains the real data. What
I would like to do is define the data to be plotted dynamically so
that the chart ends when the data ends. If there are only 20 data
points, then only plot 20 points. But if I add a 21st data point, or
subtract one, then the chart would automatically adjust to either
include or exclude one more.

I've tried defining a name that covers the range, but for the chart
wizard doesn't like that.

Any help is appreciated.

Tim