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
Solved

vba excel charting by selection

Posted on 2011-09-27
5
235 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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!
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

860 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