Closed Thread
Results 1 to 22 of 22

Dynamic Chart with drop down list

  1. #1
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29

    Dynamic Chart with drop down list

    Hi
    I have a chart example that allows the user to click an item in the drop down list and a different chart displays.
    They have example code using offset to select each item of data. Does anyone know how to get the list to select the correct data to chart?

    I am attaching an exampleof some of the code being used. I have looked at several "Google" results and no luck

    Thanks
    Elaine
    A2 CONCATENATE("Results for ",INDEX(A6:A11,A4))
    Data OFFSET(Chart!$A$4,Chart!$A$4,1,1,4)
    Metric_Name OFFSET(Chart!$A$4,Chart!$A$4,0,1,1)
    Time Conversion 60*(MID(B12,6,2))+MID(B12,9,2)

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    can you post an actual workbook?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29

    Smile Thanks for trying!

    I tried sending the working file yesterday and it was too large. I am attempting to make it smaller.
    Thanks
    Elaine
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    your chart example does update when you select an item in the list.

    What exactly is the problem?

  5. #5
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29
    Hi Andy
    The example that I gave you is not mine, I do not know how exactly to do this. I have the list box but the one I created is not working dynamically.
    I'd try and send that file but I think it is too large.


    Thanks
    Elaine

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    okay.

    The chart uses named ranges to specify where to find the correct data.

    The steps required to construct the example would be,

    Create named ranges for labels and data
    Create and format chart
    Base chart on named ranges
    create listbox

    Which step do you need help on?
    How different is your data compared to the example you attached?

  7. #7
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29
    Hi Andy
    I did the first step and I know how to create and format the chart, but I am not sure of the third step here. How do I base a chart on named rages? I know it is easier than I am making it and I really appreciate your help!


    Create named ranges for labels and data
    Create and format chart
    Base chart on named ranges
    create listbox

    Which step do you need help on?

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    After you have created a chart based on the fixed range A4:F5 use the Source Data dialog, Series tab, to change the series information.

    The series name would use the formula
    ='Dynamic Graphs'!metric_Name

    Values would use the formula
    =chart.xls!Data

  9. #9
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29
    Hi Andy
    I am not getting it. If you can do one series, I'll be on my way. Here is the chart that I am actually working on.

    Thanks a million!
    Attached Files Attached Files

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    First fix the list boxes Linked Cell property so selecting an item updates A4

    add 3 named ranges,

    LABELS
    =OFFSET(Insurance!$A$4,0,1,1,5)

    DATA
    =OFFSET(LABELS,Insurance!$A$4,0)

    Metric_Name
    =OFFSET(Insurance!$A$4,Insurance!$A$4,0,1,1)

    Set the series formula to be,
    =SERIES('650078.xls'!Metric_Name,'650078.xls'!LABELS,'650078.xls'!DATA,1)

    The chart title is actually linked to the named range Metric_Name.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29

    Lastly

    Hi Andy
    First thank you so much for your patience with this! I've done everything that you sent in the thread and the last item that is not working is the chart title. I saw in your note where you stated "Set the series formula to be,
    =SERIES('650078.xls'!Metric_Name,'650078.xls'!LABELS,'650078.xls'!DATA,1)

    The chart title is actually linked to the named range Metric_Name.

    But I did not see that in your chart and yours works perfectly.

    I am resending mine to see if you can see anything

    Again thank you!

    Elaine
    Attached Files Attached Files

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    Your chart title is current just static text. You need to link the chart title to the named range.
    This explains how to link to a cell. And the reference would be

    =NewReport.xls!Metric_Name

  13. #13
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29

    Thumbs up Thank you!

    Andy
    Got it...thanks again for your help!

    Elaine

  14. #14
    Forum Contributor
    Join Date
    10-16-2008
    Location
    Iowa
    Posts
    121

    Re: Dynamic Chart with drop down list

    Andy, I am trying to make two drop downs, graphing two lines on the same graph. I am using:
    LABELS OFFSET(ProjChart!$A$2,0,1,1,7)
    LABELS1 OFFSET(ProjChart!$A$6,0,1,1,7)
    DATA OFFSET(LABELS,$A$2,0)
    DATA1 OFFSET(LABELS1,$A$6,0)
    Metric_Name OFFSET($A$2,$A$2,0,1,1)
    Metric_Name1 OFFSET($A$6,$A$6,0,1,1)
    Chart values: Metric_Name,DATA
    Chart values1: Metric_Name1,DATA1
    Where the first group of data is in cells A2:U5, with row 2 containing dates; the second group is in cells A6:U9, with row 6 containing the same dates.
    I tried to set graph data as ProjChart!Metric_Name = ProjChart!DATA and ProjChart!Metric_Name1 = ProjChart!DATA1, but only the top set of data displays.
    Attached Files Attached Files

  15. #15
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Dynamic Chart with drop down list

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

    Please start a new thread.

  16. #16
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29

    Re: Dynamic Chart with drop down list

    Hey Andy
    I am back ;( I have tried and tried and watched videos and I am not able to create the list and select that row of data to change my chart. You walked me through this 2 years ago and unfortunately I have not been able to come back to this until now. I plan on using this and I am hoping you can help me a 2nd time.
    I have created the naed ranges, I have used the named ranges in the series and now the last two steps are completely frustrating me. Can you assist?
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    11-26-2003
    Location
    Maryland, US
    MS-Off Ver
    2010
    Posts
    29

    Re: Dynamic Chart with drop down list

    Hi Andy
    This was originally my post

  18. #18
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: Dynamic Chart with drop down list

    I know it's your thread but lets start a new one.

    In it explain your problem and what you are trying to achieve and post the example file again.

  19. #19
    Registered User
    Join Date
    10-26-2011
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Dynamic Chart with drop down list

    I also have a similar problem.
    I have created a table (pIvot table) and then craeted a normal chart based on values. I want a list box to change values based on the changing values in Pivot.
    Can you please explain where to create the named ranges and why values 0, 1... etc so that I can modify my own chart with the correct formula.Thanks a lot.

  20. #20
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Dynamic Chart with drop down list

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

  21. #21
    Registered User
    Join Date
    10-26-2011
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Dynamic Charts Using List

    My problem is similar to this post:
    http://www.excelforum.com/excel-char...down-list.html

    I have a pivot table in which I have data regarding revenue,profit,employees etc of different companies.I wish to have a chart for example compares the revenues of 2 companies A and X (A-1st companty data in first Pivot table) and (X-second company data in 2nd Pivot table.) This is a normal chart not a pivot chart.

    Now I want to have a list that has a list of company names, as I change the name like from A to B in the dropdown list, the Data on chart should now show comparision of B vs X (B-1st pivot table, X from 2nd ).

    Can you pls help.

  22. #22
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Dynamic Chart with drop down list

    Please read my post - thx

Closed Thread

Thread Information

Users Browsing this Thread

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

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