• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Interactive Chart with drop-down menu and dynamic ranges

kbolliger

New Member
Hello!


I'm trying to create a chart where the data range is based on what products the user selects, and the date range selected. There are two variables for every product. The user also has the choice to choose one or both variables for each product.


The Merged Data sheet has Dates in Column A, and each product has 3 columns, for example Product A data is in Columns B-D. Column B has the Work Order number, Column C has a count of work orders, and Column D has the associated customer service calls for that product on that day. It repeats every three columns for each new product. Along Row 1 the product name is in each cell (to help locate the appropriate data).


I had contemplated a pivot table, but based on the way I had to organize my Data I didn't think it would be feasible.


I have been working on the VBA but am having trouble connecting the Form controls to the data. I am assuming that I would write a macro where the product that is selected will be searched for on the merged data sheet. The work order data would then be offset by 1, and the customer service calls would be offset by 2.


I am assuming that using dynamic ranges will be necessary. The data will be periodically updated so I thought of having dynamic ranges for each column of data.


I created what I needed on a smaller scale using checkboxes and excel functions with the following formulas I have generalized, but when dealing with 200+ products I figured that I would need to use VBA to make it more efficient.


Dynamic Chart with Checkboxes:

o X Values


=OFFSET(Chart!$A$2,MATCH(StartDate,ChartDates,0)-1,0,MATCH(EndDate,ChartDates,0)-MATCH(StartDate,ChartDates,0)+1,1)


**$A$2 is where the data begins


o StartDate


Cell where the dropdown menu will be of the dates

=’Name of worksheet’!cell reference


o EndDate


Cell where the dropdown menu will be of the dates

=’Name of worksheet’!cellreference


o ChartDates


=Tabe1[Date]

Or, =’Name of worksheet’!rangeofdates


o ChartAmounts


=Table1[Amt]

Rest of data


o Putting it all together

Define a name for each y value range

- Yvaluerangename


o Define name with formula: =OFFSET(‘sheetname’!Xvalues,0,#ofcolumns from data)

Then, for that series plotted on the graph, use this formaul

=SERIES(‘sheetname’!referenceoftitle,’sheetname’!Xvalues,’sheetname’!Yvaluenameofyvaluerange,#of series plotted)


I am basically at a loss of where to begin. The macro for filling the data on the spreadsheet wasn't that difficult, but for some reason when it comes to charting I am at a loss! Any direction or suggestions would be MUCH appreciated!


Here's a link to a modified version of the workbook I'm working from. The macros have already been run that create the "Merged Data" sheet. RFC should be changed to Work Order but I didn't have time to alter all the VBA.


http://dl.dropbox.com/u/67322153/Interactive%20Chart%20Dynamic%20Ranges%20Workbook.xlsm


Thanks!
 
Hi, kbolliger!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the three first green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about your question...


If you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords "chart dynamic range" or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s), maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.


http://chandoo.org/wp/2009/10/15/dynamic-chart-data-series/

http://chandoo.org/wp/2009/02/12/make-a-dynamic-chart-using-data-filters/

http://chandoo.org/wp/2008/11/05/select-show-one-chart-from-many/


Do you think these suits as kickoff?


Regards!
 
I can probably do what you want. But WHAT THE HECK DO U NEED ON THE GRAPH>!!><!<>??!
 
Haha. Sorry that probably wasn't clear.


I need to graph the count of "tickets" and the count of "work orders" for a given product against time.


I need to be able to have the user select the different products he wants to graph and if he wants the count of tickets and work orders for each product. The user will also select the date range.


It probably doesn't seem logical as I've changed the titles of things, but I promise it makes sense. lol.
 
i hope what you want can achived by modifying excel from http://www.excelhero.com/cgi-bin/mt/mt-search.cgi?blog_id=4&tag=Animated%20Chart&limit=20


regards,
 
Back
Top