+ Reply to Thread
Results 1 to 9 of 9

Excel 2007 : Pivot tables and scatterplots

  1. #1
    Registered User
    Join Date
    07-16-2010
    Location
    New york
    MS-Off Ver
    Excel 2007
    Posts
    9

    Pivot tables and scatterplots

    So I created a pivot table with a bunch of data I have and I also have a scatterplot that I would like to coordinate with it (ie every time I add a field, the data will appear in the scatter plots and if I want to remove a point from the chart, I can simply uncheck from the pivot table. Here's my problem: when I add or remove data from the pivot table all the other existing data moves to new cells and and chart is thrown off. What's my best solution? (i hope this all makes sense..)

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

    Re: Pivot tables and scatterplots

    You may be able to use dynamic named ranges.

    Or add code to the pivot table update event which would then adjust chart.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    07-16-2010
    Location
    New york
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Pivot tables and scatterplots

    Thanks Andy, would you mind explaining?

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

    Re: Pivot tables and scatterplots

    What do you need explaining?

    There are many posts on charts using dynamic named ranges.

    The vba code required would greatly depend on your workbook setup. The update event can be located by right clicking the sheet tab with the pivot table on. This will take you to the VBE. Select Workbook in the left hand dropdown. The select the PivotTableUpdate event from the right hand dropdown.
    Post an example workbook if you need more help.

  5. #5
    Registered User
    Join Date
    07-16-2010
    Location
    New york
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Pivot tables and scatterplots

    Ok, I'm a bit confused, so I've attached a sample. Thanks again!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-16-2010
    Location
    New york
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Pivot tables and scatterplots

    I might add that I am looking to do something a bit like this next attachment. However, I would like to be able to add more than one selection from the drop down list to create a scatterplot. I would also need each point in the scatter to have a label

  7. #7
    Registered User
    Join Date
    07-16-2010
    Location
    New york
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Pivot tables and scatterplots

    Here's the attachment...
    Attached Files Attached Files

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

    Re: Pivot tables and scatterplots

    Your first example has a pivot table but is based on a file on your server.

    Your second file has no pivot table and the chart is not xy scatter.

    Now I'm confused, care to explain.

  9. #9
    Registered User
    Join Date
    07-16-2010
    Location
    New york
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Pivot tables and scatterplots

    I think I was over complicating things. Came up with a better way since then, thanks for all the help, andy!

+ 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