Solved

vba excel charting by selection

Posted on 2011-09-27
5
226 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
ID: 36712338
Have you looked at a pivotchart? The filtering is bult in.
 
0
 

Author Comment

by:solarissf
ID: 36712506
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
ID: 36712718
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
ID: 36716771
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
ID: 36817575
Thank you, I ended up using a regular chart, with a userform for input.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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