What I would like to do is define a range which includes a column of
labels, a column of x values, and a column of y values. Then, when
the macro is run, it would produce a scatter plot with each point
labeled with a text box. It would be ok with me if the labels
overlapped. I could always adjust them by hand.
Thanks for the help,
--
Jeff Bangert je...@kuhub.cc.ukans.edu
Computer Center je...@ukanvax.bitnet
University of Kansas
Lawrence, KS 66045
(913)864-0466
Yeah, it's pretty easy too. Suppose Sheet1 looks like this:
label x y
a 1 1
b 2 2
c 3 3
Now you create a default scatter chart based on that using the charting
wizard. Activate the chart (double click on it so it comes up in its
own window) and run the following macro (which assumes 3 data points -
change the constant in the second line to fix that).
LabelScatterPoints (a)
=FOR("i",1,3)
= ATTACH.TEXT(4,1,i)
= FORMULA(OFFSET(Sheet1!$A$1,i,0))
=NEXT()
=RETURN()
--
Joel Spolsky
Program Manager
Microsoft Excel
joe...@microsoft.com