PC Review


Reply
Thread Tools Rate Thread

Chart attached to dynamic range

 
 
Avi
Guest
Posts: n/a
 
      7th Aug 2005
Hello,

I try to create a multiple a chart based on three columns and a variable nb of columns where the columns are the X axis

a1 b1 c1
bbb 4 5 7
ccc 5 6 4
ddd 3 5 3


To do that i create a dynamic ranged name and put it in the Range field in the chart wizard. The problem is after doing that, the ranged name becomes an usual static range address. Is there a way to keep the cahrt linked to the Named range instead?

Thanks a lot for your help


Avi Benita 054-4660641 wwwAvi Benita 054-4660641 www.avibenita.com
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      8th Aug 2005
You can link the name, xvalues, and yvalues of a chart series to
individual named ranges, but you can't link the entire source data range
to a named range.

You can mimic the effect you want with a VBA procedure. Assuming your
range of interest is named SourceData, and the chart is the first chart
object on the sheet, right click the sheet tab, select View Source, and
paste this procedure into the code module that appears:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("SourceData")) Is Nothing Then
ChartObjects(1).Chart.SetSourceData Source:=Range("SourceData")
End If
End Sub

This is an event procedure, which is triggered by the event of the user
changing the SourceData range.

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


Avi wrote:

> Hello,
>
> I try to create a multiple a chart based on three columns and a variable
> nb of columns where the columns are the X axis
>
> a1 b1 c1
> bbb 4 5 7
> ccc 5 6 4
> ddd 3 5 3
>
>
> To do that i create a dynamic ranged name and put it in the Range field
> in the chart wizard. The problem is after doing that, the ranged name
> becomes an usual static range address. Is there a way to keep the cahrt
> linked to the Named range instead?
>
> Thanks a lot for your help
>
>
> Avi Benita 054-4660641 wwwAvi Benita 054-4660641 www.avibenita.com
> <http://www.avibenita.com>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart empty with new data in the dynamic range chart. Feejo Microsoft Excel Misc 16 3rd Jan 2008 10:03 PM
dynamic chart range with VBA Jacob Microsoft Excel Programming 6 25th Sep 2006 03:28 PM
Dynamic Chart Range Chuck Taylor Microsoft Excel Programming 2 24th Jul 2005 06:49 AM
Dynamic Range Chart ??? Yogalete Microsoft Excel Charting 3 27th Apr 2005 11:51 PM
Dynamic Chart Range and Chart Update ExcelMonkey Microsoft Excel Programming 1 6th Jul 2004 08:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:57 PM.