+ Reply to Thread
Results 1 to 10 of 10

Chart data with row selection

  1. #1
    Registered User
    Join Date
    11-04-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Chart data with row selection

    Good morning. I'm stuck and am hoping someone may be able to help.

    I have a database in spreadsheet form with each record saved on a different row. I will be using the data in each row to create a bar graph / timeline.

    What I am trying to do is add a "row select" feature on the chart that would allow me to select which database entry (row) Excel used to create the chart. I would like to be able to change this selection freely so that I can analyze each database entry. I assume there is a VBA solution. I just can't seem to find any examples online. Thanks in advance for any suggestions.
    Last edited by cas8100; 11-04-2009 at 12:34 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Chart data with row selection

    Here's an example from Andy Pope using data Validation, MATCH and INDEX function. The value is A7 is selected using Data Validation Dropdown Box, In A6, the MATCH function finds out what row that row of data would be in.
    Please Login or Register  to view this content.
    In B7:M7, the INDEX function returns the appropriate value
    Please Login or Register  to view this content.
    Does that work for you?
    Notes; You can change the font color of A6 to white to not see that number or you can use a FORM dropdown box over A7 with a link to A7 to hide the number returned.
    Attached Files Attached Files
    Last edited by ChemistB; 11-04-2009 at 12:01 PM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    11-04-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Chart data with row selection

    Thank you! That is exactly what I'm after. Is there a way to put that drop down box on the chart itself so that I don't have to reference (display on projector) the spreadsheet containing the data?

    CS

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Chart data with row selection

    Yes, In Excel 2007, select your chart and go to the Layout Tab of your ribbon. There's an option for Data Table >Show Data Table. Does that do what you want?

    Note, that shows your data but doesn't allow you to modify your choices. Hmmmm. I would move the chart to a worksheet rather than in a standalone sheet and then have that data/functions directly below the chart. You can format the rest of the spreadsheet to not show gridlines.
    Last edited by ChemistB; 11-04-2009 at 11:26 AM.

  5. #5
    Registered User
    Join Date
    11-04-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Chart data with row selection

    Well.... I'd more like to just move cell A7 (in your example file) to display only that cell and its associated drop down box on the chart itself. I would make the chart its own tab in the workbook so that I don't have to display any of the tabular data.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Chart data with row selection

    You can go with a Forms List Box;
    Go to your chart tab and on the ribbon> Developer (if it's not there, you need to go to Excel options to make it visible)>Insert > Forms List box. Then create a Forms List box on your chart and right click on it and Format Control. Fill in the correct ranges. Does that work?

    Edit: I updated my original attachment to work this way. Take a look.
    Last edited by ChemistB; 11-04-2009 at 11:58 AM.

  7. #7
    Registered User
    Join Date
    11-04-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Chart data with row selection

    Man....have to say you guys are pretty good. Thanks very much.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Chart data with row selection

    Don't forget to mark this thread closed if you're satisfied with the solution.

  9. #9
    Registered User
    Join Date
    11-04-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Chart data with row selection

    I would....but I'm not exactly sure how to do that. Didn't know that was forum etiquette.

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Chart data with row selection

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to 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