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 / New Users / January 2008

Tip: Looking for answers? Try searching our database.

VBA - Get data range of chart

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
spectrallypure - 16 Jan 2008 22:31 GMT
Dear all,

I have several charts in a sheet for which I need to change the data
ranges. Currently each chart has a different data range, and for each
chart the new desired data range is just an straightforward extension
of the original (i.e., the new data ranges could be easily calculated
from the original ones just by adding a fixed number of rows/
columns).

I am therefore trying to implement a macro for updating the data
ranges of my charts automatically, but so far I haven't found a way
for getting the actual data range of a chart. I guess I'm looking for
something like the opposite of ActiveChart.SetSourceData, i.e.
something like "ActiveChart.GetSourceData".... does anybody know of a
way of getting  the current data range of a chart?

Thanks in advance for any help / ideas! :)

Regards,

Jorge Luis.
Don Guillett - 17 Jan 2008 13:22 GMT
Lots of different ways to do this. Look here
     http://peltiertech.com/Excel/Charts/index.html

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

> Dear all,
>
[quoted text clipped - 17 lines]
>
> Jorge Luis.
Shane Devenshire - 19 Jan 2008 19:05 GMT
Hi,

I didn't go out to Jon's site and check around but here is one simple way
without VBA assuming you are using Excel 2003 or later.

1. Select the data in the spreadsheet and press Ctrl+L, OK.  This will
convert the data range into a list.

The chart will automatically add new data as it is entered below that chart.
You can convert the range to a list before or after you create the chart.
Your new data must be directly below the previous data.  This technique only
works in the vertical direction.  You should probably use dynamic range
names for horizontal data.

Cheers,
Shane

> Dear all,
>
[quoted text clipped - 17 lines]
>
> Jorge Luis.
 
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.