Solved

vba excel charting by selection

Posted on 2011-09-27
5
206 Views
Last Modified: 2012-05-12
Hi Guys,

Looking to do a new project with charting monthly performance numbers.  Data is pretty straightforward, each trader has its own column, each row is a new months performance.

I was thinking of having a userform, where you can click on multiple traders names, and by doing so, will populate a chart with the data of the trader I selected.

Just looking for some ideas, possible better than what I'm thinking already.

Would you have a chart already made.. and the selections change the populating, or would you use the selection to create a new chart using vba everytime I run?

suggestions or thoughts?
0
Comment
Question by:solarissf
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:sanofi-aventis
Comment Utility
Have you looked at a pivotchart? The filtering is bult in.
 
0
 

Author Comment

by:solarissf
Comment Utility
wow... looks great.  One thing though, this is going to a client and I would like to make the selection screen look "pretty".  In addition to leaving the Field List on the side of the screen... do you think I could somehow have a some kind of search field to populate Fields also.  Reason being ... hypothetically the list could be huge.

And to pivot charts have the functionality to somehow edit the data ranges.  Like for example data is for 4 years, but I make a easy selection to change data range for only last year.
0
 

Author Comment

by:solarissf
Comment Utility
So looking into this further, the pivot chart always does something with the data, sum/count/average.  And from what I am reading I am not able to show the actual values.  Is this true, because I am looking to show the actual values in my data range.
0
 
LVL 2

Accepted Solution

by:
sanofi-aventis earned 500 total points
Comment Utility
solarissf,
Sorry for the delay.

You can manipulate the pivotchart through VBA code if you want to filter from a user form or other input mechanism.

You can also use a regular chart and filter the source range using VBA and a user form for input. The chart will only display visible cells from the range's rows or columns.

If your data is set up to use with a regular chart, I would think sum, min, max should all return the same thing and be fine for the pivotchart because you would probably have a 1 to 1 relationship.

Last, if you are working with Excel 2010, you would have the Slicer object to use for your filtering. This would give you more eye candy for your presentation.

http://datapigtechnologies.com/blog/index.php/excel-2010-slicers/

Sincerely,
T-Bone
0
 

Author Comment

by:solarissf
Comment Utility
Thank you, I ended up using a regular chart, with a userform for input.
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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

772 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

10 Experts available now in Live!

Get 1:1 Help Now