ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatically Increasing Chart Ranges (https://www.excelbanter.com/excel-programming/296958-automatically-increasing-chart-ranges.html)

kiza[_3_]

Automatically Increasing Chart Ranges
 
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
--
Message posted from http://www.ExcelForum.com


Don Guillett[_4_]

Automatically Increasing Chart Ranges
 
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

"yogendra joshi" wrote in message
...
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

kiza < wrote:
I have attached the file which will hopefully make it easier. The macro
in question is called "Name Ranges" and I have placed '*' where I think
that the problem lies.

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

I would appreciate it if I could have some assistance in adding new
rows to this table which will allow the chart to be updated with
additional information. I think that it has something to do with
Intergers, Variants and Ranges but I have looked through it this
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=531113
---
Message posted from http://www.ExcelForum.com/





Jon Peltier[_7_]

Automatically Increasing Chart Ranges
 
This can be solved without VBA code, and without attachments to the
newsgroup, as Don has pointed out.

Check out the examples and links on this web page:

http://peltiertech.com/Excel/Charts/Dynamics.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

yogendra joshi wrote:

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

kiza < wrote:

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

I have produced a table, Data, which supplies the chart with the data
that it needs. And it works fine until I add additional rows to the
table located within Data.
I would appreciate it if I could have some assistance in adding new
rows to this table which will allow the chart to be updated with
additional information. I think that it has something to do with
Intergers, Variants and Ranges but I have looked through it this
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=531113
---
Message posted from http://www.ExcelForum.com/




All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com