[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

vba excel charting by selection

Posted on 2011-09-27
5
Medium Priority
?
258 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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

831 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