+ Reply to Thread
Results 1 to 3 of 3

User button to update graph series one row per click

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    Maine
    MS-Off Ver
    Excel 2010
    Posts
    45

    User button to update graph series one row per click

    I have used vba code to interpret an extensive amount of data and am now to the stages of making user friendly graphs. Ideally I would like to have two buttons; one the user clicks to update the graph series by going down a row (“forward”) and one to go up (“back”). The data will always be in a sheet titled “Graph” and the starting row of data (y-axis) is from B32 to CH32. The x-axis values are always in B32 to CH31 and each series title is in the A column corresponding to the row the series data is coming from.

    Ideal situation would have a button to update the series up and one down the rows, updating the title of the graph to match the row the series data is coming from. I list box or combo box that is updated with the values in column A from row 32 down to the last row so the user can click on the value they want to reference and it will update the graph to the corresponding row of data.

    Im not sure what the best method would be to go about completing this. If it should all be coded in VBA or if the sheet/graph could be set up so that the listbox/combobox updates to include the data to the last row as the data is added to the sheet.

    I have attached an example of what the sheet will look like.
    ExampleGraphSheet.xlsx

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: User button to update graph series one row per click

    The following is based on using named dynamic ranges to plot the graph. The X-axis is fixed as you described. The first row after the X-axis is offset by 1, the next row by 2, etc. On the parameters page I set some values (like minimum and maximum row so you can't step out of the range). I keep track of the current row. When you click the Down Button, it adds one to this row as well as the offset. When you click the Up button, it subtracts one from this row and the offset. I get the title from the formula in cell B9.

    I also added another feature: Go to Number. The dropdown list is controlled by the range of numbers. Select a number, and click on the number.

    The Parameters page also contains the definitions of the named ranges.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    09-13-2012
    Location
    Maine
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: User button to update graph series one row per click

    It took me a bit to understand what was referencing what and how to modify them to fit my dynamic sheet but I got it! Thank you very much for your time. Your sheet allowed me to work through what you did and actually understand what is being done instead bombarding you with questions for clarity. I truly appreciate your help.

+ 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. How to Copy and paste data by click Update Button
    By Nisar.mohammed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2015, 01:37 PM
  2. How to Arrange value in the chart by click update Button
    By Nisar.mohammed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2015, 09:25 AM
  3. [SOLVED] ComboBox Time Value/Command button click update
    By hwtcrl in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-01-2015, 01:15 PM
  4. VBA code to switch graph type at click of a button
    By no.18shirt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-15-2013, 05:05 AM
  5. [SOLVED] How do I update my static line graph to allow a user to select which data to graph
    By capcon in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-31-2011, 10:22 PM
  6. UserForm, update after command button click
    By ker9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2010, 01:05 PM
  7. Click Boxes for each series in a graph
    By ExcelMonkey in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-17-2005, 07:05 PM

Tags for this Thread

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