Solved

vba excel charting by selection

Posted on 2011-09-27
5
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

734 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