+ Reply to Thread
Results 1 to 9 of 9

How to create a dynamic graph with check boxes to choose a specific year?

  1. #1
    Registered User
    Join Date
    07-03-2018
    Location
    Stuttgart, Germany
    MS-Off Ver
    2013
    Posts
    12

    How to create a dynamic graph with check boxes to choose a specific year?

    Hello everybody,

    I am trying to create a diagram which shows me data for certain years. The years should be selectable via checkboxes. Only the selected years should be displayed in the diagram.
    The data is to be displayed in the form of a stacked bar chart.
    In the attachment is my previous Excel file, into which the checkboxes are already linked to the corresponding cells (True=Wahr; False=Falsch).
    Is there a simple way to link the data in the table to the diagram so that it is possible to sepereate the Information into years?

    Thanks in advance.

    Best regards
    gauger
    Attached Files Attached Files

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: How to create a dynamic graph with check boxes to choose a specific year?

    The best way to do this is with a helper table.

    Table of data => processed into helper table => helper table is used to create chart.

    See attached, with helper table in C70:O74.
    Attached Files Attached Files
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  3. #3
    Registered User
    Join Date
    07-03-2018
    Location
    Stuttgart, Germany
    MS-Off Ver
    2013
    Posts
    12

    Re: How to create a dynamic graph with check boxes to choose a specific year?

    Hey ben,

    thank you so far for your help.

    unfortunately I need another layout of the diagram. For example, if I select 2 years, they should not be cumulated in a column, but displayed next to each other in the diagram. For example, if I select 2018 and 2019, a total of 24 months will be displayed on the x-axis. Each month of a particular year should therefore represent a separate column in the diagram. A changing x-axis, so to speak.

    Do you have any idea how I can solve this Problem?

    Best regards
    gauger

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,559

    Re: How to create a dynamic graph with check boxes to choose a specific year?

    If you were to change the format of the data as shown on sheet2, (it only took a few minutes to drag the data, paste months and input years) you could then produce a pivot table and graph (which I believe does what you want) as shown on sheet3.
    Years are filtered in the bottom left of the graph.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    07-03-2018
    Location
    Stuttgart, Germany
    MS-Off Ver
    2013
    Posts
    12

    Re: How to create a dynamic graph with check boxes to choose a specific year?

    Hey JeteMC,

    thank you so much for your help, this was exactly what i was searching for.

    Best regards
    Gauger

  6. #6
    Registered User
    Join Date
    07-03-2018
    Location
    Stuttgart, Germany
    MS-Off Ver
    2013
    Posts
    12

    Re: How to create a dynamic graph with check boxes to choose a specific year?

    Hey again,

    I actually have one more question. Is it possible if the values in sheet2 Change, that automatically the graph changes? if I enter other values in sheet2 at the moment, the bars in sheet3 are not adjusting.

    Thank you in advance.

    Best regards
    gauger

  7. #7
    Registered User
    Join Date
    08-02-2018
    Location
    India
    MS-Off Ver
    office 365
    Posts
    20

    Re: How to create a dynamic graph with check boxes to choose a specific year?

    After making any changes, go to Data tab--->Select RefreshAll. The change will affected in Graph.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,559

    Re: How to create a dynamic graph with check boxes to choose a specific year?

    You're Welcome and thank you for the feedback. Providing that RaviMis' post answered the question about updating the graph, please take a moment to mark the thread as 'Solved' using the thread tools drop down in the ribbon above your first post.
    To go truly automatic I believe that you would need VBA to update the pivot table and chart when the data is changed (I am a VBA illiterate). After marking this thread as 'Solved', open a new thread that addresses that question in either the Excel General or Excel Programming / VBA / Macros forum.
    I hope that you have a blessed day.

  9. #9
    Registered User
    Join Date
    07-03-2018
    Location
    Stuttgart, Germany
    MS-Off Ver
    2013
    Posts
    12

    Re: How to create a dynamic graph with check boxes to choose a specific year?

    Thank you guys for your help. I am fine with this solution :P

    BR
    gauger

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] create a dynamic table based on selected check boxes
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-13-2015, 07:28 AM
  2. Replies: 3
    Last Post: 11-15-2013, 06:28 PM
  3. Replies: 3
    Last Post: 06-27-2013, 07:43 PM
  4. [SOLVED] Dynamic Chart with Active X Check Boxes - Adding drilldown
    By jrvstl in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-10-2012, 02:43 PM
  5. dynamic graph with check box
    By arnab0711 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-01-2011, 05:29 AM
  6. Check boxes linked to Dynamic Pivot Table
    By cymon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-28-2007, 04:01 AM
  7. Replies: 1
    Last Post: 02-09-2006, 06:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1