+ Reply to Thread
Results 1 to 3 of 3

Using Next/Back buttons to change Chart data source

  1. #1
    Registered User
    Join Date
    09-15-2017
    Location
    New York
    MS-Off Ver
    Pro Plus 2013
    Posts
    9

    Question Using Next/Back buttons to change Chart data source

    Hello everyone,

    Long time lurker, finally posting. This forum is great. Everyone gives excellent advice, so I'm hoping for more of the same.

    Background:
    I need to graph three different years of data on the same chart so all three years can be compared simultaneously. Example is below:
    chart.jpg

    Desired outcome:
    I would like to be able to hit “Next” and “Back” buttons to navigate between the different “Event Types”. The chart will update automatically to show the “Event Type” data for all three years.
    chart_buttons.jpg

    In the example below, the current event type being displayed for all three years is "Concerts", when I hit NEXT I would like the data for "Fairs" for all three years to populate in the chart.
    chartdata.jpg

    Problems:
    I have tried using OFFSET, but I cannot get it to increase or decrease incrementally with each “Next” or “Back” click.

    I have tried recording a macro for the “Next” and “Back” buttons, but once again, moving forward or backwards incrementally has been difficult. Example: If the current event is “Concerts”, I hit NEXT and the “Fairs” data loads, but if I hit NEXT again(to load the “Special Events” data), nothing happens.

    Dynamic ranges. I would use this approach if I only had 3 Event Types to graph, but in reality I have a little under 200 event types to graph. I only included 3 in the example.

    Any help would be greatly appreciated.

    Thanks in advance

    Enjoy the weekend everyone!

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Using Next/Back buttons to change Chart data source

    maybe validation list in a cell with events?

  3. #3
    Registered User
    Join Date
    09-15-2017
    Location
    New York
    MS-Off Ver
    Pro Plus 2013
    Posts
    9

    Re: Using Next/Back buttons to change Chart data source

    Quote Originally Posted by tim201110 View Post
    maybe validation list in a cell with events?
    tim201110 you are a genius!

    I used the INDEX function for each of the three separate series(Events, Fairs, etc.), but made each one reference their own dataset. Each INDEX function pointed to the same "switch" cell.

    So whenever I changed the switch from "1" to "2" to "3", etc. all three data sets updated automatically.

    The graph part was easy, I simply made the graph reference the area where I put the INDEX formula, so each time the switch changed, the graph would use the updated dataset.

    For the “forward” and “back” buttons I just made a macro that increases or decreases the value of the “switch” cell by one.

    This is exactly what I was looking for. Nice work!

+ 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] Radio Buttons to Toggle Chart Source Data
    By gophins in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2015, 11:39 AM
  2. [SOLVED] Toggle Buttons to change data source in single chart
    By eface2face in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2012, 03:45 PM
  3. how to automatically change source data in a chart?
    By els_pricing_heather in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-29-2011, 10:29 AM
  4. Excel 2007 : Copy chart, change data source
    By Mimil in forum Excel General
    Replies: 5
    Last Post: 02-03-2011, 08:08 AM
  5. Not able to change Excel chart data source
    By booo in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-21-2010, 02:15 PM
  6. Excel 2007 : Change chart source data in XL2007
    By normc in forum Excel General
    Replies: 2
    Last Post: 12-31-2009, 05:07 PM
  7. change Line Chart source data in VB
    By Centurian77 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-20-2005, 12:52 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