View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default automatically updating chart

Hi,

There are two common approaches to this problem, depending one what you
actually do.

A. If you are willing to delete old data and your data is laid out in a
column layout then
1. Select the range of data, say A1:B50 (includes titles) and choose Data,
List, Create List, OK.
2. When you add a new line of data on row 26 the chart will automatically
plot the new data.
3. Howerver, and here is the rub, to get rid of the extra data point from
row 2 you need to highlight those two cell A2:B2 and delete them from the
data set (press Ctrl+- (control minus).

B. Suppose you don't want to delete the history, the data earlier than that
which you want you chart to plot - you can use dynamic range names: Suppose
your data starts in A1:B1 and goes down an unknown number of rows of which
you want to plot the last 24. With column A containing the X axis lables and
column B the data.

1. Plot your chart using the entire range, lets say A1:B50.
2. Choose Insert, Name, Define and in the Names in workbook line enter X
3. On the Refert to line enter the formula:
=OFFSET(Sheet1!$A$1,COUNTA(Sheet1!$A$2:$A$1000),,-24)
4. On the Names in Workbook line enter Y
5. Edit the formula in the Refers to line to read: (change the first
reference from A to B)
=OFFSET(Sheet1!$B$1,COUNTA(Sheet1!$A$2:$A$1000),,-24)
4. Click OK.
5. Select the series on the chart and on the formula bar change formula from
=SERIES(Sheet1!$B$1,Sheet1!$A$2:$A$50,Sheet1!$B$2: $B$50,1)
to
=SERIES(Sheet1!$B$1,Sheet1!X,Sheet1!Y,1)
and press Enter.

When you press Enter the formula will change to Sheet1!X to something like
Book1!X. In this example I have assumed you may put data down to row 1000,
you can adjust this as needed.


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"rayteach" wrote:

I have a chart displaying 2 years worth of data €“ each month is a data point.
I want to automatically drop the oldest data point and add the newest when I
start to enter data for the new month. I know how to change the data range
manually to do this. Can it be done automatically? Using Excel 2003 running
under XP Pro.
--
ray