Solved

Excel VBA - Applyinging newly imported data range to a chart

Posted on 2013-01-07
4
210 Views
Last Modified: 2013-01-07
Hi

I import data into Excel from both SQL and Access and generate fairly complex charts in Excel manually.
In the past I have encountered a lot of problems using Excel VBA to automate this so I want to rather apply the imported data range to each chart.
I need a few pointers on the best way to do this so that the chart doesn't lose any of its original structure.
0
Comment
Question by:murbro
  • 2
4 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 38750126
There are different ways. If you have the imports set up as queries then using either structured references (2007 or later) or dynamic named ranges, you shouldn't really need to do anything other than refresh the queries.
Alternatively you can simply alter the data sources of the charts by looping and altering the XValues and Values properties of each series in the charts (I am assuming they are too complex for a simple SetSourceData statement).
0
 
LVL 39

Expert Comment

by:als315
ID: 38750205
0
 

Author Closing Comment

by:murbro
ID: 38750420
Thanks very much
0
 

Author Comment

by:murbro
ID: 38750428
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now