+ Reply to Thread
Results 1 to 2 of 2

drawing chart only of select data

  1. #1

    drawing chart only of select data

    Hi All,
    I am very new person to VBA world. I am given a task of drawing a
    XY Scatter Plot of data that are marked 1 ( or marked by checkbox) and
    showing the labels of those data. I started with some online help and
    auto-filter but I am stuck now.

    This is the kind of data I have:

    State Height Age Show Flag
    A 100 2 0
    B 200 10 1
    M 300 1 0
    D 400 8 1
    E 250 9 0

    I used the code from
    http://support.microsoft.com/?kbid=213750
    to add data lables to my plot but when I use auto-filter to show the
    rows with the "show flag=1", then the code snippet from Microsoft
    doesn't take the filtering into account and shows the labels from the
    unfiltered data.

    I am plotting height(x axis) versus Age(y-axis) with State name as data
    label.

    Any help would be appreciated.

    thank you
    Sri


  2. #2
    Andy Pope
    Guest

    Re: drawing chart only of select data

    Hi,

    You should only need to run the code once to apply labels to all points.
    The use auto filter to reduce the points displayed. This will only work
    if you have the option "Plot visible cells only" enabled. Select the
    chart and use the menus Tools > Options > Chart to check setting.

    Cheers
    Andy

    [email protected] wrote:
    > Hi All,
    > I am very new person to VBA world. I am given a task of drawing a
    > XY Scatter Plot of data that are marked 1 ( or marked by checkbox) and
    > showing the labels of those data. I started with some online help and
    > auto-filter but I am stuck now.
    >
    > This is the kind of data I have:
    >
    > State Height Age Show Flag
    > A 100 2 0
    > B 200 10 1
    > M 300 1 0
    > D 400 8 1
    > E 250 9 0
    >
    > I used the code from
    > http://support.microsoft.com/?kbid=213750
    > to add data lables to my plot but when I use auto-filter to show the
    > rows with the "show flag=1", then the code snippet from Microsoft
    > doesn't take the filtering into account and shows the labels from the
    > unfiltered data.
    >
    > I am plotting height(x axis) versus Age(y-axis) with State name as data
    > label.
    >
    > Any help would be appreciated.
    >
    > thank you
    > Sri
    >


    --

    Andy Pope, Microsoft MVP - Excel
    http://www.andypope.info

+ 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