+ Reply to Thread
Results 1 to 2 of 2

From a selected line in a chart i want to filter a table or pivot table

  1. #1
    Registered User
    Join Date
    10-08-2016
    Location
    amsterdam
    MS-Off Ver
    2010
    Posts
    1

    From a selected line in a chart i want to filter a table or pivot table

    Hi,
    I am facing a challenge. In a chart with multiple lines, I would like to able when I click on a line or mouse over a line to see the corresponding datapoint in the the table or pivot table...So basically, filtering a table based on the element i click or select on a chart with my mouse.

    Do you think that it is achievable ? What would be the methodology ? Is there a VBA code for this ? I have seen examples, but they are working on the oppiste way; click or mouse over an observation and the line is highlighted...

    Thanks in advance

    saskap

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

    Re: From a selected line in a chart i want to filter a table or pivot table

    Yes, this is possible. It might be better if you can provide a sample workbook.

    Here is some code I wrote back in 2009. This code is on the sheet containing the chart object. The chart is a X-Y chart that has a date associated with it. When you click on the point you get a message box with the series name, the date, and the X-Y coordinates. This part of the code, I think I understand. the point is you can get the X-Y data and look up whatever other information you want and then go on from there to set filters.

    I also have a function called GetADate (Press CTRL-D) where you enter in a date and it finds the point associated with it. This one had me scratching my head until I realized that I was just plotting a second series consisting of the single point.

    I've done this for an X-Y scatter plot with date. I would have to be adapted for other kinds of charts and other data sets.

    Obviously, this was a demonstration program: something for me to learn on. I haven't "advanced" the technology beyond playing with it.
    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.

+ 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. Pivot Table How to make text box equal to value selected in filter
    By liamfrancis2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-07-2016, 10:38 AM
  2. [SOLVED] VBA filter Pivot Table to only user selected value
    By nigelbloomy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-10-2014, 11:11 AM
  3. Pivot table not showing the selected items when filter added
    By ShaliniGomes in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-23-2014, 01:44 AM
  4. VBA target line using pivot table bar chart
    By Turmoilz in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-28-2013, 05:44 AM
  5. Counting the number of Selected Fields in a Pivot Table Filter
    By adoepker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2011, 11:53 AM
  6. add Trend Line to Pivot Table Chart
    By Matt D Francis in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-27-2006, 11:30 AM
  7. Chart Base Line in Pivot table
    By smonczka in forum Excel General
    Replies: 0
    Last Post: 04-14-2005, 11:06 AM

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