Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Named Range as Chart Source

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Abdul - 18 Mar 2008 08:45 GMT
Hello!,

I am using a named range (dynamic: with offset and counta, to include
additional rows automatically) as my chart source (Office 2007). But i
noticed that every time I run the chart it changes the source to the
range itself (absolute) and not using the source as named range.

This is not done through vba.

Is there a way that I can use a dynamic named range in a chart (Office
2007)?

Thanks,

Abdul
Bob Phillips - 18 Mar 2008 10:56 GMT
You cannot use a named range for the whole  data source, you have to have
separate named ranges for each series.

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hello!,
>
[quoted text clipped - 11 lines]
>
> Abdul
Jon Peltier - 18 Mar 2008 13:35 GMT
Of course, with VBA you could do this. In the Sheet1 code module (assuming
thee chart and the data are on Sheet1):

Private Sub Worksheet_Change(ByVal Target As Range)
 ChartObjects(1).Chart.SetSourceData Source:=Range("MyChartRange")
End Sub

If this fires too frequently (every time a cell is changed), you might try
this:

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

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

> You cannot use a named range for the whole  data source, you have to have
> separate named ranges for each series.
[quoted text clipped - 14 lines]
>>
>> Abdul
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.