Automatically Increasing Chart Ranges

K

kiza

I have attached the file which will hopefully make it easier. The macr
in question is called "Name Ranges" and I have placed '*' where I thin
that the problem lies.

I have produced a table, Data, which supplies the chart with the dat
that it needs. And it works fine until I add additional rows to th
table located within Data.

I would appreciate it if I could have some assistance in adding ne
rows to this table which will allow the chart to be updated wit
additional information. I think that it has something to do wit
Intergers, Variants and Ranges but I have looked through it thi
morning without sucess.

If anyone can aid me in this, that would be fantastic.

Regards,
Kieron White
:confused

Attachment filename: audit tracker.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=53111
 
D

Don Guillett

PLEASE do not attach files here. We try to teach the questioners to not
attach so let's not have the answerers attach.
Send files direct to the OP.
Thanks,

--
Don Guillett
SalesAid Software
[email protected]
yogendra joshi said:
Hi Kieron..
Really good and useful question....

Find the sheet attached..

I have removed all your code, to keep it very simple.
You can add other code that is not relating to chart for your use.

I have created named range "Chart" with following formula:
"=OFFSET(Data!$B$4,0,0,COUNTA(Data!$B$4:$B$65536),4)"

Also, in the Data sheet, i have inserted a code....
Private Sub Worksheet_Change(ByVal Target As Range)
Charts("New_Chart").SetSourceData (Sheets("Data").Range("chart"))
End Sub


This does the trick and you really DO NOT need any other code...

Hope this helps
 
Top