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
support.microsoft.com/?kbid=213750
to add data lables to my plot but when I use auto-filter to show the
rows with the quot;show flag=1quot;, 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
SriHi,
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 quot;Plot visible cells onlyquot; enabled. Select the
chart and use the menus Tools gt; Options gt; Chart to check setting.
Cheers
Andy
wrote:
gt; Hi All,
gt; I am very new person to VBA world. I am given a task of drawing a
gt; XY Scatter Plot of data that are marked 1 ( or marked by checkbox) and
gt; showing the labels of those data. I started with some online help and
gt; auto-filter but I am stuck now.
gt;
gt; This is the kind of data I have:
gt;
gt; State Height Age Show Flag
gt; A 100 2 0
gt; B 200 10 1
gt; M 300 1 0
gt; D 400 8 1
gt; E 250 9 0
gt;
gt; I used the code from
gt; support.microsoft.com/?kbid=213750
gt; to add data lables to my plot but when I use auto-filter to show the
gt; rows with the quot;show flag=1quot;, then the code snippet from Microsoft
gt; doesn't take the filtering into account and shows the labels from the
gt; unfiltered data.
gt;
gt; I am plotting height(x axis) versus Age(y-axis) with State name as data
gt; label.
gt;
gt; Any help would be appreciated.
gt;
gt; thank you
gt; Sri
gt;
--
Andy Pope, Microsoft MVP - Excel
www.andypope.info
- Jul 25 Fri 2008 20:45
drawing chart only of select data
close
全站熱搜
留言列表
發表留言